https://github.com/graze/docker-composer
:notes: A small Docker image for composer.
https://github.com/graze/docker-composer
composer docker
Last synced: 5 months ago
JSON representation
:notes: A small Docker image for composer.
- Host: GitHub
- URL: https://github.com/graze/docker-composer
- Owner: graze
- License: mit
- Created: 2016-02-15T11:01:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-19T09:58:43.000Z (about 8 years ago)
- Last Synced: 2025-04-21T01:10:26.163Z (6 months ago)
- Topics: composer, docker
- Language: Shell
- Homepage: https://hub.docker.com/r/graze/composer/
- Size: 65.4 KB
- Stars: 11
- Watchers: 20
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# graze/docker-composer
[](https://travis-ci.org/graze/docker-composer)
[](https://hub.docker.com/r/graze/composer/)
[](https://microbadger.com/images/graze/composer)A _small_ Docker image for [composer](https://getcomposer.org), a dependency management tool for PHP.
## Images
This repository generates an image for each composer version, php version and combination thereof
The available composer versions are:
* `1.5.1`, `latest`
* `1.5.0`
* `1.4.3`
* `1.4.2`
* `1.4.1`
* `1.4.0`
* `1.3.3`
* `1.3.2`
* `1.3.1`
* `1.3.0`The available php versions are:
* `php-7.1`, `latest` ([php-7.1/Dockerfile](https://github.com/graze/docker-composer/blob/master/php-7.1/Dockerfile))
* `php-7.0` ([php-7.0/Dockerfile](https://github.com/graze/docker-composer/blob/master/php-7.0/Dockerfile))
* `php-5.6` ([php-5.6/Dockerfile](https://github.com/graze/docker-composer/blob/master/php-5.6/Dockerfile))Combination images are in the format: `{composer_ver}-php{php_ver}`
* `1.4.1-php7.1`
* `1.4.0-php5.6`
* etc...## Usage
```bash
~$ docker run --rm -it \
-v $(pwd):/usr/src/app \
-v ~/.composer:/home/composer/.composer \
-v ~/.ssh/id_rsa:/home/composer/.ssh/id_rsa:ro \
graze/composer
```### Simulating the platform
To be able to simulate a platform environment to install you can use the composer configuration option [platform](https://getcomposer.org/doc/06-config.md#platform).
```json
{"config": {"platform": {
"php": "5.6",
"ext-something": "4.0.0"
}}}
```You can use this, or the `:php-XX` tags to specify that target platform that you want the packages to be installed on.
## Image Updates
The Docker Hub image ([graze/composer](https://hub.docker.com/r/graze/composer/)) is an automated build that's also rebuilt daily to pickup any composer updates.
##Â Development
You can build an individual image with:
```bash
~$ PHP_VER=7.1 COMPOSER_VER=1.4.1 make build
```or build and test all images with:
```bash
~$ make all-build all-test
```