Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/howtocodewell/composer

PHP Composer Docker Image
https://github.com/howtocodewell/composer

Last synced: about 1 month ago
JSON representation

PHP Composer Docker Image

Awesome Lists containing this project

README

        

# Composer - How To Code Well

This creates a Composer Docker image that has some PHP extensions configured.
Each Docker tag will follow PHP versions.

See all available tags on the [Docker Hub](https://hub.docker.com/repository/docker/howtocodewell/composer/tags)

## To build locally
`docker build -t howtocodewell/composer: .`

## To use this within your current project
Add this to your `docker-compose.yml`

```yaml
composer:
image: howtocodewell/composer:
working_dir: /var/www/html
volumes:
- .:/app
```

# Useful commands
Pro tip! These are great in a Makefile

Check for Composer updates

`docker-compose run --rm -w /app --no-deps composer bash -ci 'composer update'`

Install Composer packages

`docker-compose run --rm -w /app --no-deps composer bash -ci 'composer install'`

Update Composer packages

`docker-compose run --rm -w /app --no-deps composer bash -ci 'composer update'`