This repository contains Dockerfile of PHP for Docker's automated build.
-
Install Docker.
-
Download automated build from public Docker Hub Registry:
docker pull renothing/php:tag(alternatively, you can build an image from Dockerfile:
docker build -t="php:5.6-fpm" github.com/renothing/docker-php.git#:Dockerfile.5) -
default environments supported,you can change them before building or running.
the php-fpm start with port 9000
PORT=9000
TIMEZONE=Asia/Shanghai
PHP_ERROR=Off
PHP_MAX_EXECUTION=900
PHP_MEMORY_LIMIT=256m
PHP_MAX_UPLOAD_SIZE=50m
PHP_MAX_UPLOAD=200
PHP_MAX_POST=100m
FPM_RESTART_THRESHOLD=30
FPM_RESTART_INTERVAL=30s
FPM_MAX=512 #fpm max process
FPM_MAX_REQUESTS=8192 #max requests per process
- 5-fpm,5,7,7-fpm,latest,dev
docker run -dit --env-file /path/yourenv --name php -v yourapppath:/var/www renothing/php:tag
#link with nginx or database container
docker run -dit --env-file /path/yourenv --name php -v yourapppath:/var/www --link yourdbserver:dbhost renothing/php:tag
#check logs
docker logs php
mount your own ssmtp config file to /etc/ssmtp/ssmtp.conf ref: https://wiki.archlinux.org/index.php/SSMTP