A nginx official docker image built on top of docker-suite (dsuite) dsuite/alpine-base container.
A full list of dsuite/alpine-base environment variables are described in the alpine-base Readme.
Variable | Default | Description |
---|---|---|
NGINX_USER |
nginx |
nginx.conf user |
NGINX_WORKER_PROCESSES |
auto |
nginx.conf worker_processes |
NGINX_WORKER_CONNECTIONS |
1024 |
nginx.conf worker_connections |
NGINX_SERVER_NAME |
localhost |
server name defined in conf.d/default.conf |
NGINX_ROOT |
empty |
server name defined in conf.d/default.conf |
PHP_FPM_ENABLE |
false |
Enable PHP-FPM |
PHP_FPM_HOST |
localhost |
IP address or hostname of remote PHP-FPM server. |
PHP_FPM_PORT |
9000 |
Port of remote PHP-FPM server |
80 |
443 |
docker run --name some-nginx -v /some/content:/var/www:ro -d dsuite/alpine-nginx
docker run --name some-nginx -p 8080:80 -d dsuite/alpine-nginx
Then you can hit http://localhost:8080
or http://host-ip:8080
in your browser.
docker run --name some-nginx -v ./nginx.conf:/etc/nginx/nginx.conf:ro -d dsuite/alpine-nginx
docker run --name some-nginx -v ./site.conf:/etc/nginx/conf.d/site.conf:ro -d dsuite/alpine-nginx
docker run --name some-nginx -v ./log:/var/log -d dsuite/alpine-nginx
For more example, look at the .example folder.