mirror of
https://github.com/mashirozx/docker-php-nginx.git
synced 2024-11-24 15:58:16 +08:00
Describe how to easily add composer. Closes #21
This commit is contained in:
parent
531442435d
commit
61a7284615
15
README.md
15
README.md
@ -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
|
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_
|
_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
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user