Skip to content

Commit

Permalink
Describe how to easily add composer. Closes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
TrafeX committed Feb 9, 2020
1 parent 5314424 commit 61a7284
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,18 @@ PHP-FPM configuration:
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php7/php-fpm.d/server.conf" trafex/alpine-nginx-php7

_Note; Because `-v` requires an absolute path I've added `pwd` in the example to return the absolute path to the current directory_


## Adding composer

If you need composer in your project, here's an easy way to add it;

```dockerfile
FROM trafex/alpine-nginx-php7:latest

# Install composer from the official image
COPY --from=composer /usr/bin/composer /usr/bin/composer

# Run composer install to install the dependencies
RUN composer install --optimize-autoloader --no-interaction --no-progress
```

0 comments on commit 61a7284

Please sign in to comment.