@@ -10,7 +10,7 @@ By default, `nginx` package from `nginx.org` is being installed. If `NGINX_PACKA
The `NGINX_VERSION` build argument controls the `nginx` package version that is going to be installed. By default, version `1.13*` (the latest) is used.
**NOTICE: package versions in official Debian repositories are much older than on `nginx.org`; hence, when using them, remember to set `NGINX_VERSION` accordingly. As of this writing Debian jessie package version is at `1.10*`.**
**NOTICE: package versions in official Debian repositories are much older than on `nginx.org`; hence, when using them, remember to set `NGINX_VERSION` accordingly. As of this writing Debian stretch package version is at `1.10*`.**
## Environment variables
...
...
@@ -27,6 +27,19 @@ The `NGINX_VERSION` build argument controls the `nginx` package version that is
these control the locations where the `run.sh` script expects to find the `nginx` pidfile, the file to watch for logrotate signalling, and the SSL DH parameters files; these should reflect `nginx` config.
-`NGINX_PACKAGE` (default: "`nginx`")
-`NGINX_VERSION` (default: "`1.13*`")
Name of Nginx package to install, and version of it. If the package name is exactly `nginx`, it is installed from official Nginx repositories; otherwise it is installed from Debian repositories. Backports repository is supported in the latter case the same way as in `INSTALL_PACKAGES` (see below).
-`INSTALL_PACKAGES` (default: empty)
Space-separated list of packages to be installed upon building the container. All packages are installed with `--no-install-recommend` flag passed to `apt-get`.
Installing packages from [Debian Backports](https://backports.debian.org/) is supported by appending `:backports` to a package name. The backports repository will be added automagically if there is at least one package to be installed from it.
For example, setting `INSTALL_PACKAGES` to `tmux:backports screen` will install `screen` from the main repository, then set-up `stretch-backports`, and install `tmux` from there. This also works with package versions and regexen: setting `INSTALL_PACKAGES` to `tmux=2.2-1~bpo8+1:backports` will set-up `stretch-backports` and install version `2.2-1~bpo8+1` of `tmux` from there; setting `INSTALL_PACKAGES` to `vim*:backports` will set-up `stretch-backports` and install all packages whise names start with `vim` from there,
### Examples
Building the image with `nginx` package from `nginx.org`, version `1.13.x` (i.e. the default):
...
...
@@ -43,6 +56,12 @@ Building the image with `nginx-extras` package from the Debian repository, versi
Upon start it creates a dhparam file in `$DHPARAM_FILE` (if the file does not exist) and sets an `inotify` watch on `$WATCH_FILE`. Once the watch discovers that the watchfile has been modified, it sends the `USR1` signal to `nginx`, which causes it to reload the logfiles.