These image extends webdevops/base with a nginx daemon which is running on port 80 and 443

Uses Supervisord

This image is using supervisor and runs the daemon under user application (UID 1000; GID 1000) as default. If the container is started under a different user the daemon will be run under the specified uid.

Docker image tags

Tag Distribution name
alpine Alpine (rolling release)
alpine-3 deprecated
ubuntu-12.04 precise
ubuntu-14.04 trusty (LTS)
ubuntu-15.04 vivid
ubuntu-15.10 wily
ubuntu-16.04 xenial (LTS)
debian-7 wheezy
debian-8 jessie
debian-9 stretch

Environment variables

Base environment variables

Environment variable Description Default
LOG_STDOUT Destination of daemon output empty (stdout)
LOG_STDERR Destination of daemon errors empty (stdout)
SERVICE_CRON_OPTS cron daemon arguments empty (when syslog is used)
SERVICE_DNSMASQ_OPTS dnsmasq daemon arguments empty (when syslog is used)
SERVICE_DNSMASQ_USER dnsmasq effective user root
SERVICE_POSTFIX_OPTS postfix daemon arguments empty (when syslog is used)
SERVICE_SSH_OPTS ssh daemon arguments empty (when syslog is used)
SERVICE_SUPERVISOR_OPTS supervisor daemon arguments empty (when syslog is used)
SERVICE_SUPERVISOR_USER supervisor effective user root
SERVICE_SYSLOG_OPTS syslog daemon arguments empty (when syslog is used)

Web environment variables

Environment variable Description Default
WEB_DOCUMENT_ROOT Document root for webserver /app
WEB_DOCUMENT_INDEX Index document index.php
WEB_ALIAS_DOMAIN Domain aliases *.vm
WEB_PHP_SOCKET PHP-FPM socket address (for php-* images)
SERVICE_PHPFPM_OPTS PHP-FPM command arguments empty (when php fpm is used)
SERVICE_APACHE_OPTS Apache command arguments empty (when apache is used)
SERVICE_NGINX_OPTS Nginx command arguments empty (when nginx is used)


Nginx customization

This image has two directories for configuration files which will be automatic loaded.

For global configuration options the directory /opt/docker/etc/nginx/conf.d can be used. For vhost configuration options the directory ``/opt/docker/etc/nginx/vhost.common.conf``can be used.

Any *.conf files inside these direcories will be included either global or the vhost section.

Docker image layout

Nginx layout

File/Directory Description
/opt/docker/etc/nginx/conf.d badge-customization

Main global configuration directory

(automatically included files)

/opt/docker/etc/nginx/conf.d/10-php.conf PHP cgi configuration
/opt/docker/etc/nginx/ssl badge-customization

SSL configuration directory for

certifications and keys

/opt/docker/etc/nginx//ssl/server.crt badge-customization Example SSL certification (*.vm)
/opt/docker/etc/nginx/ssl/server.csr badge-customization Example SSL certification request (*.vm)
/opt/docker/etc/nginx/ssl/server.key badge-customization Example SSL key (*.vm)
/opt/docker/etc/nginx/vhost.common.d badge-customization

Vhost configuration directory

(automatically included files)

/opt/docker/etc/nginx/vhost.common.d/10-location-root.conf Redirect requests to DOCUMENT_INDEX
/opt/docker/etc/nginx/vhost.common.d/10-php.conf PHP cgi configuration for vhost
/opt/docker/etc/nginx/global.conf Global nginx configuration
/opt/docker/etc/nginx/main.conf Main Nginx configuration
/opt/docker/etc/nginx/php.conf badge-deprecated Deprecated PHP configuration
/opt/docker/etc/nginx/vhost.common.conf badge-deprecated Deprecated vhost common include
/opt/docker/etc/nginx/vhost.conf Vhost configuration
/opt/docker/etc/nginx/vhost.ssl.conf Vhost SSL configuration
/opt/docker/etc/supervisor.d/nginx.conf Supervisord configuration file for Nginx