Skip to content

docker-suite/alpine-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alpine-nginx

Build Status Docker Pulls Docker Stars MicroBadger Layers (tag) MicroBadger Size (tag) License: MIT dockeri.co

A nginx official docker image built on top of docker-suite (dsuite) dsuite/alpine-base container.

Environment variables

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

Ports

80
443

How to use this image

Hosting simple static content

docker run --name some-nginx -v /some/content:/var/www:ro -d dsuite/alpine-nginx

Exposing external port

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.

Using your own conf files

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

Local logs

docker run --name some-nginx -v ./log:/var/log -d dsuite/alpine-nginx

Examples

For more example, look at the .example folder.