Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
/ composer Public archive

Composer with different versions of PHP

Notifications You must be signed in to change notification settings

ihneo/composer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMPOSER

Composer Dockerfiles with different versions of PHP (mainly for our needs)

Example of Usage

Move to the folder containing the desired Dockerfile.

Build the image

docker build -t <dockertag> .

Create a shell script called composer-php<version>.sh with this content :

#!/bin/bash
docker run --rm --interactive --tty \
  --env COMPOSER_HOME=/tmp/composer/config \
  --env COMPOSER_CACHE_DIR=/tmp/composer/cache \
  --workdir /app \
  --volume $PWD:/app \
  --volume ${COMPOSER_HOME:-$HOME/.config/composer}:/tmp/composer/config \
  --volume ${COMPOSER_CACHE_DIR:-$HOME/.cache/composer}:/tmp/composer/cache \
  --user $(id -u):$(id -g) \
  <dockertag> composer "$@"

Dockerhub

All images are available at : https://hub.docker.com/r/ihneo/composer

You can pull all images with the command :

docker pull ihneo/composer:<dockertag>

Supported tags and respective Dockerfile links

Example of usage with the images available at Dockerhub

#!/bin/bash
docker run --rm --interactive --tty \
  --env COMPOSER_HOME=/tmp/composer/config \
  --env COMPOSER_CACHE_DIR=/tmp/composer/cache \
  --workdir /app \
  --volume $PWD:/app \
  --volume ${COMPOSER_HOME:-$HOME/.config/composer}:/tmp/composer/config \
  --volume ${COMPOSER_CACHE_DIR:-$HOME/.cache/composer}:/tmp/composer/cache \
  --user $(id -u):$(id -g) \
  ihneo/composer:<dockertag> composer "$@"

Composer 1 or 2

To use composer in version 1, command is composer

To use composer in version 2, command is composer2

About

Composer with different versions of PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published