|
1 | | -Docker PHP-FPM 7.2 & Nginx 1.14 on Alpine Linux |
2 | | -============================================== |
| 1 | +# Docker PHP-FPM 7.2 & Nginx 1.14 on Alpine Linux |
3 | 2 | Example PHP-FPM 7.2 & Nginx 1.14 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/). |
4 | 3 | The image is only +/- 35MB large. |
5 | 4 |
|
6 | 5 |
|
| 6 | +* Built on the lightweight and secure Alpine Linux distribution |
| 7 | +* Very small Docker image size (+/-35MB) |
| 8 | +* Uses PHP 7.2 for better performance, lower cpu usage & memory footprint |
| 9 | +* Optimized for 100 concurrent users |
| 10 | +* Optimized to only use resources when there's traffic (by using PHP-FPM's ondemand PM) |
| 11 | +* The servers Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure |
| 12 | +* The logs of all the services are redirected to the output of the Docker container (visible with `docker logs -f <container name>`) |
| 13 | + |
| 14 | + |
7 | 15 | [](https://hub.docker.com/r/trafex/alpine-nginx-php7/) |
8 | 16 |
|
9 | | -Usage |
10 | | ------ |
11 | | -Start the Docker containers: |
| 17 | +### Breaking changes (26/01/2019) |
| 18 | + |
| 19 | +Please note that the new builds since 26/01/2019 are exposing a different port to access Nginx. |
| 20 | +To be able to run Nginx as a non-privileged user, the port it's running on needed |
| 21 | +to change to a non-privileged port (above 1024). |
| 22 | + |
| 23 | +The last build of the old version that exposed port 80 was `trafex/alpine-nginx-php7:ba1dd422` |
| 24 | + |
| 25 | +## Usage |
| 26 | + |
| 27 | +Start the Docker container: |
12 | 28 |
|
13 | | - docker run -p 80:80 trafex/alpine-nginx-php7 |
| 29 | + docker run -p 80:8080 trafex/alpine-nginx-php7 |
14 | 30 |
|
15 | 31 | See the PHP info on http://localhost, or the static html page on http://localhost/test.html |
0 commit comments