Use Drupal Console in a Docker container.
-
Clone this repository
git clone --recursive https://github.com/mparker17/docker-drupalconsole.git cd docker-drupalconsole
-
Build the image:
docker-build -t drupalconsole .
-
Run:
cd /path/to/drupal/root docker run --rm -it -v="$pwd:/var/www/html" drupalconsole $rest_of_drupal_console_command
for example,
docker run --rm -it -v="$pwd:/var/www/html" drupalconsole list docker run --rm -it -v="$pwd:/var/www/html" drupalconsole generate:module
Since the Drupal Console project doesn't contain a license file, I'm not including one here either.
However, since the Drupal Console project is posted to drupal.org, it's GNU/GPL version 2 and later.