Used to create Docker images for running composer [https://getcomposer.org]
-
Install the
initlab/composer
container (optional - this step is performed by Docker automatically when running the container):$ docker pull denisura/composer
-
Define an bash alias that runs this container whenever
composer
is invoked on the command line:$ echo "alias composer='docker run --rm -it -v \$(pwd):/workspace initlab/composer'" >> ~/.bashrc $ source ~/.bashrc
-
Run composer as always:
$ composer init --require=foo/bar:1.0.0 -n
$ composer self-update
$ composer install -o
$ composer require "foo/bar:1.0.0"