The Composer docker image based on Alpine docker image.
5.4K
The Composer docker image based on Alpine. Alpine is based on Alpine Linux, lightweight Linux distribution based on BusyBox. The size of the image is very small, less than 50 MB!
Versions and are based on PHP versions.
Here are the supported tags and respective Dockerfile links.
latest (Dockerfile)This image is published in the Docker Hub. Simply run this command below to get it to your machine.
docker pull matriphe/alpine-composer:latest
Alternatively you can clone this repository and build the image using the docker build command.
docker run --rm --name=composer -v $(pwd):/app matriphe/alpine-composer:latest
If you run and want to link Nginx container, make sure you created and run this PHP-FPM the container before running this Nginx container. Make sure the /www volume in PHP-FPM container is mapped.
--rm argument use to rebuild older container if exists.--name argument sets the name of the container.-v argument maps current directory to /app directory in container, so the results of composer will be persistent.Add to your ~/.bashrc this line, so you can just type composer command from command line. Make sure the docker engine is running.
alias composer='docker run --rm --name=composer -v $(pwd):/www matriphe/alpine-composer:latest composer'
And then execute this command to make alias working.
source ~/.bashrc
Now you can just simply type composer from command line.
Content type
Image
Digest
sha256:2bc2980ca…
Size
11.2 MB
Last updated
over 10 years ago
docker pull matriphe/alpine-composer