mirror of
https://github.com/mashirozx/docker-php-nginx.git
synced 2024-11-22 14:58:15 +08:00
Updated to PHP7.1. Improved the overall config based on the trafex/wordpress image
This commit is contained in:
parent
2b10ea0cee
commit
acdeb2cbbb
13
Dockerfile
13
Dockerfile
@ -1,9 +1,16 @@
|
|||||||
FROM alpine:3.5
|
FROM alpine:3.5
|
||||||
LABEL Maintainer="Tim de Pater <code@trafex.nl>" \
|
LABEL Maintainer="Tim de Pater <code@trafex.nl>" \
|
||||||
Description="Lightweight container with Nginx 1.10 & PHP-FPM 7.0 based on Alpine Linux."
|
Description="Lightweight container with Nginx 1.10 & PHP-FPM 7.1 based on Alpine Linux."
|
||||||
|
|
||||||
# Install packages
|
# Install packages from testing repo's
|
||||||
RUN apk --no-cache add php7 php7-fpm nginx supervisor --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/
|
RUN apk --no-cache add php7 php7-fpm php7-mysqli php7-json php7-openssl php7-curl \
|
||||||
|
php7-zlib php7-xml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype \
|
||||||
|
php7-mbstring php7-gd nginx \
|
||||||
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ \
|
||||||
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/
|
||||||
|
|
||||||
|
# Install packages from stable repo's
|
||||||
|
RUN apk --no-cache add supervisor curl
|
||||||
|
|
||||||
# Configure nginx
|
# Configure nginx
|
||||||
COPY config/nginx.conf /etc/nginx/nginx.conf
|
COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Docker PHP-FPM 7.0 & Nginx 1.10 on Alpine Linux
|
Docker PHP-FPM 7.1 & Nginx 1.10 on Alpine Linux
|
||||||
==============================================
|
==============================================
|
||||||
Example PHP-FPM 7.0 & Nginx 1.10 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/).
|
Example PHP-FPM 7.1 & Nginx 1.10 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/).
|
||||||
The image is only +/- 60MB large.
|
The image is only +/- 60MB large.
|
||||||
|
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Usage
|
|||||||
-----
|
-----
|
||||||
Start the Docker containers:
|
Start the Docker containers:
|
||||||
|
|
||||||
sudo docker run -p 80:80 trafex/alpine-nginx-php7
|
docker run -p 80:80 trafex/alpine-nginx-php7
|
||||||
|
|
||||||
See the PHP info on http://localhost, or the static html page on http://localhost/test.html
|
See the PHP info on http://localhost, or the static html page on http://localhost/test.html
|
||||||
|
|
||||||
|
@ -26,3 +26,6 @@ pm.process_idle_timeout = 10s;
|
|||||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||||
; Default Value: 0
|
; Default Value: 0
|
||||||
pm.max_requests = 500
|
pm.max_requests = 500
|
||||||
|
|
||||||
|
; Make sure the FPM workers can reach the environment variables for configuration
|
||||||
|
clear_env = no
|
||||||
|
@ -65,5 +65,4 @@ http {
|
|||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
include conf.d/*.conf;
|
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[Date]
|
[Date]
|
||||||
date.timezone="Europe/Amsterdam"
|
date.timezone="UTC"
|
||||||
|
@ -7,6 +7,8 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
autorestart=false
|
||||||
|
startretries=0
|
||||||
|
|
||||||
[program:nginx]
|
[program:nginx]
|
||||||
command=nginx -g 'daemon off;'
|
command=nginx -g 'daemon off;'
|
||||||
@ -14,3 +16,5 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
autorestart=false
|
||||||
|
startretries=0
|
||||||
|
Loading…
Reference in New Issue
Block a user