Sign inSign up

jdeathe/composer

By jdeathe

•Updated over 8 years ago

Docker build of Alpine - PHP CLI / Composer.

Image
1

1.4K

jdeathe/composer repository overview

⁠Composer Image

Docker image of the Composer⁠ dependency manager for PHP.

⁠Run template

Run template for use on Project Atomic's⁠ based environments where the atomic run⁠ command is available.

⁠Pull the image.

To inspect an image it is necessary to pull it.

$ docker pull \
  jdeathe/composer:1.5.6-php56
⁠Inspect the run label.

The run label provides the docker run usage template.

$ docker inspect \
  --format '{{ .ContainerConfig.Labels.run }}' \
  --type=image \
  jdeathe/composer:1.5.6-php56

⁠Installing run wrapper

Installing the run wrapper script allows you to use composer as though it were a locally installed package.

$ eval "$(docker inspect \
  --format "{{.ContainerConfig.Labels.install}}" \
  jdeathe/composer:1.5.6-php56
)"
⁠Verify the installation
$ composer -vvv -V
⁠Running PHP version

Using the PHP_VERSION environment variable it's possible to be selective about the PHP version used with composer.

To run composer with PHP 7.1 the PHP_VERSION environment variable should be set to either 71, 7.1 or 7.1.12.

$ PHP_VERSION=7.1 composer -vvv --version

⁠Uninstalling run wrapper

$ eval "$(docker inspect \
  --format "{{.ContainerConfig.Labels.uninstall}}" \
  jdeathe/composer:1.5.6-php56
)"

Tag summary

Content type

Image

Digest

Size

34.9 MB

Last updated

over 8 years ago

docker pull jdeathe/composer