Nginx and PHP 7.2 depends on Centos 7
10K+
Docker image support Nginx and PHP 7.1 depends on Centos 7. Composer and supervisor added, very convenient for Laravel projects.
Support most useful modules,
Run image
docker run -d --name nginx-php -p 8080:80 wwtg99/docker-nginx-php7:latest
Show service status
docker exec nginx-php supervisorctl status
Restart service
docker exec nginx-php supervisorctl restart all
Use your own server
docker run -d --name nginx-php -p 8080:80 -v /your_server_dir:/data/www -v /your_server_conf_dir:/data/conf/nginx wwtg99/docker-nginx-php7:latest
Notice, if /data/conf/nginx/website.conf is not exists, there will create a default server config file. So use website.conf for your config file name, or there will be conflict for port 80.
Set timezone: TZ
docker run -d --name nginx-php -p 8080:80 -e "TZ=Asia/Shanghai" wwtg99/docker-nginx-php7:latest
Set server domain for default config: DOMAIN
docker run -d --name nginx-php -p 8080:80 -e "DOMAIN=test.com" wwtg99/docker-nginx-php7:latest
Note, it is only useful for auto generated nginx config.
If you have your own scripts to run before server started, add them to script.sh and put the script in the script volume. Note, timezone setting is disabled if you use your own script.
docker run -d --name nginx-php -p 8080:80 -v /your_script_dir:/data/script wwtg99/docker-nginx-php7:latest
Content type
Image
Digest
Size
274.7 MB
Last updated
over 8 years ago
docker pull wwtg99/docker-nginx-php7