1
1
# Docker PHP-FPM 8.0 & Nginx 1.20 on Alpine Linux
2
- Example PHP-FPM 8.0 & Nginx 1.20 setup for Docker, build on [ Alpine Linux] ( https://www.alpinelinux.org/ ) .
3
- The image is only +/- 40MB large.
2
+ Example PHP-FPM 8.0 & Nginx 1.20 container image for Docker, build on [ Alpine Linux] ( https://www.alpinelinux.org/ ) .
4
3
5
4
Repository: https://github.com/TrafeX/docker-php-nginx
6
5
@@ -9,24 +8,19 @@ Repository: https://github.com/TrafeX/docker-php-nginx
9
8
* Very small Docker image size (+/-40MB)
10
9
* Uses PHP 8.0 for better performance, lower CPU usage & memory footprint
11
10
* Optimized for 100 concurrent users
12
- * Optimized to only use resources when there's traffic (by using PHP-FPM's on-demand PM )
13
- * The servers Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure
11
+ * Optimized to only use resources when there's traffic (by using PHP-FPM's ` on-demand ` process manager )
12
+ * The services Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure
14
13
* The logs of all the services are redirected to the output of the Docker container (visible with ` docker logs -f <container name> ` )
15
14
* Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs
16
15
17
-
18
16
[ ![ Docker Pulls] ( https://img.shields.io/docker/pulls/trafex/php-nginx.svg )] ( https://hub.docker.com/r/trafex/php-nginx/ )
19
17
![ nginx 1.18.0] ( https://img.shields.io/badge/nginx-1.20-brightgreen.svg )
20
18
![ php 8.0] ( https://img.shields.io/badge/php-8.0-brightgreen.svg )
21
19
![ License MIT] ( https://img.shields.io/badge/license-MIT-blue.svg )
22
20
23
- ### Docker Hub repository name change
24
- Since we switched to PHP8 the repository name [ trafex/alpine-nginx-php7] ( https://hub.docker.com/r/trafex/alpine-nginx-php7 ) didn't make sense anymore.
25
- Because you can't change the name of the repository on Docker Hub I created a new one.
26
-
27
- From now on this image can be pulled from Docker Hub under the name [ trafex/php-nginx] ( https://hub.docker.com/r/trafex/php-nginx ) .
28
-
29
- The old repository will still be available and kept up to date with [ trafex/php-nginx] ( https://hub.docker.com/r/trafex/php-nginx ) .
21
+ ## Goal of this project
22
+ The goal of this container image is to provide an example for running Nginx and PHP-FPM in a container which follows
23
+ the best practices and is easy to understand and modify to your needs.
30
24
31
25
## Usage
32
26
@@ -40,6 +34,12 @@ Or mount your own code to be served by PHP-FPM & Nginx
40
34
41
35
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/php-nginx
42
36
37
+ ### Docker Hub repository name change
38
+ Since we switched to PHP8 the repository name [ trafex/alpine-nginx-php7] ( https://hub.docker.com/r/trafex/alpine-nginx-php7 ) didn't make sense anymore.
39
+ Because you can't change the name of the repository on Docker Hub I created a new one.
40
+
41
+ From now on this image can be pulled from Docker Hub under the name [ trafex/php-nginx] ( https://hub.docker.com/r/trafex/php-nginx ) .
42
+
43
43
## Configuration
44
44
In [ config/] ( config/ ) you'll find the default configuration files for Nginx, PHP and PHP-FPM.
45
45
If you want to extend or customize that you can do so by mounting a configuration file in the correct folder;
0 commit comments