Skip to content

Commit 61a7284

Browse files
committed
Describe how to easily add composer. Closes #21
1 parent 5314424 commit 61a7284

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,18 @@ PHP-FPM configuration:
5858
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php7/php-fpm.d/server.conf" trafex/alpine-nginx-php7
5959

6060
_Note; Because `-v` requires an absolute path I've added `pwd` in the example to return the absolute path to the current directory_
61+
62+
63+
## Adding composer
64+
65+
If you need composer in your project, here's an easy way to add it;
66+
67+
```dockerfile
68+
FROM trafex/alpine-nginx-php7:latest
69+
70+
# Install composer from the official image
71+
COPY --from=composer /usr/bin/composer /usr/bin/composer
72+
73+
# Run composer install to install the dependencies
74+
RUN composer install --optimize-autoloader --no-interaction --no-progress
75+
```

0 commit comments

Comments
 (0)