Skip to content

Commit acdeb2c

Browse files
committed
Updated to PHP7.1. Improved the overall config based on the trafex/wordpress image
1 parent 2b10ea0 commit acdeb2c

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
FROM alpine:3.5
22
LABEL Maintainer="Tim de Pater <[email protected]>" \
3-
Description="Lightweight container with Nginx 1.10 & PHP-FPM 7.0 based on Alpine Linux."
3+
Description="Lightweight container with Nginx 1.10 & PHP-FPM 7.1 based on Alpine Linux."
44

5-
# Install packages
6-
RUN apk --no-cache add php7 php7-fpm nginx supervisor --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/
5+
# Install packages from testing repo's
6+
RUN apk --no-cache add php7 php7-fpm php7-mysqli php7-json php7-openssl php7-curl \
7+
php7-zlib php7-xml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype \
8+
php7-mbstring php7-gd nginx \
9+
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ \
10+
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/
11+
12+
# Install packages from stable repo's
13+
RUN apk --no-cache add supervisor curl
714

815
# Configure nginx
916
COPY config/nginx.conf /etc/nginx/nginx.conf

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Docker PHP-FPM 7.0 & Nginx 1.10 on Alpine Linux
1+
Docker PHP-FPM 7.1 & Nginx 1.10 on Alpine Linux
22
==============================================
3-
Example PHP-FPM 7.0 & Nginx 1.10 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/).
3+
Example PHP-FPM 7.1 & Nginx 1.10 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/).
44
The image is only +/- 60MB large.
55

66

@@ -10,7 +10,7 @@ Usage
1010
-----
1111
Start the Docker containers:
1212

13-
sudo docker run -p 80:80 trafex/alpine-nginx-php7
13+
docker run -p 80:80 trafex/alpine-nginx-php7
1414

1515
See the PHP info on http://localhost, or the static html page on http://localhost/test.html
1616

config/fpm-pool.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ pm.process_idle_timeout = 10s;
2626
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
2727
; Default Value: 0
2828
pm.max_requests = 500
29+
30+
; Make sure the FPM workers can reach the environment variables for configuration
31+
clear_env = no

config/nginx.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,4 @@ http {
6565
deny all;
6666
}
6767
}
68-
include conf.d/*.conf;
6968
}

config/php.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[Date]
2-
date.timezone="Europe/Amsterdam"
2+
date.timezone="UTC"

config/supervisord.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ stdout_logfile=/dev/stdout
77
stdout_logfile_maxbytes=0
88
stderr_logfile=/dev/stderr
99
stderr_logfile_maxbytes=0
10+
autorestart=false
11+
startretries=0
1012

1113
[program:nginx]
1214
command=nginx -g 'daemon off;'
1315
stdout_logfile=/dev/stdout
1416
stdout_logfile_maxbytes=0
1517
stderr_logfile=/dev/stderr
1618
stderr_logfile_maxbytes=0
19+
autorestart=false
20+
startretries=0

0 commit comments

Comments
 (0)