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
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?