0

I am running Drupal 8 on Docker. It's easy to setup Drupal Console on XAMPP or Acquia dev desktop, but I am not able to setup Drupal Console in a Docker container.

Usually, I run this command in the Drupal site root directory and Drupal Console starts working.

composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader --sort-packages

I tried it on Docker, but it doesn't work. Instead, it shows the following output.

./composer.json has been updated
DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files

What is the proper way to install Drupal Console in the Docker container environment?

New contributor
Shakil Ahmad is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as too broad by leymannx, Jdrupal, mradcliffe, MrD, Kevin Oct 8 at 16:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Welcome to Drupal Answers! This question is a little too broad, as you don't describe exactly what you don't understand in setting up Drupal Console on Docker. You just say that the methods used on, for example, XAMPP, don't work for a Docker container, but you don't say exactly which methods you tried. – kiamlaluno Oct 8 at 7:56
  • Yeah let me edit the question – Shakil Ahmad Oct 8 at 8:01
  • Are you running composer from within the docker bash? The message you get is telling you that it is already installed, did you try using it by running vendor/bin/drupal from project root inside docker bash? – Ismail Cherri Oct 8 at 10:19
  • yes, I am using it from docker. and Yes, I have tried it but not working. – Shakil Ahmad Oct 8 at 15:34
  • Have to explain what "not working" means. – Kevin Oct 8 at 16:55

Browse other questions tagged or ask your own question.