This image has been deprecated in favour of the official composer Docker Container that now is built on Alpine and PHP 7.
A lightweight Docker image for Composer
It provides:
v1.6.1v7.1.xFor the full list of available PHP extensions see the lucor/php7-cli base image
docker run --rm -ti \
-v $(pwd):/app \
lucor/composer
The following command will:
$HOME/.composer directory to share cache and token docker run --rm -ti
-v $(pwd):/app \
-v $HOME/.composer:/home/.composer \
-u $(id -u):$(id -g) \
lucor/composer --ansi install
The following command will:
$HOME/.composer directory to share cache and token$HOME/.ssh directory to share ssh keys docker run --rm -ti \
-v $(pwd):/app \
-v $HOME/.composer:/home/.composer \
-v $HOME/.ssh:/home/.ssh:ro \
-u $(id -u):$(id -g) \
lucor/composer --ignore-platform-reqs install
Depending on your project, you could need a different version of PHP.
The image expose the composer binary via a /composer/bin volume.
To create a named container that share the volume:
docker create -v /composer/bin --name composer lucor/composer /bin/true
Now you can use the --volume-from flag to mount the /composer/bin volume from
the composer container in another container:
docker run --rm -ti --volumes-from composer php:7.1-alpine /composer/bin/composer -v
Content type
Image
Digest
Size
35.6 MB
Last updated
over 4 years ago
docker pull lucor/composer