Commit e48a1347 authored by Michał 'rysiek' Woźniak's avatar Michał 'rysiek' Woźniak
Browse files

bumped to debian:stretch, nginx version to 1.13* (if from nginx binary repo)

parent 4ac7bf53
FROM debian:jessie
FROM debian:stretch
# Watchful NginX container -- nginx docker container that watches for
# logrotated logfiles and makes sure nginx reloads them when needed.
......@@ -31,15 +31,20 @@ MAINTAINER Michał "rysiek" Woźniak <rysiek@occrp.org>
ARG NGINX_PACKAGE=nginx
# NOTICE: Debian-provided packages are *older*, so adjust NGINX_VERSION accordingly
# (as of this writing Debian jessie package version is at 1.6*)
ARG NGINX_VERSION=1.11*
# (as of this writing Debian stretch package version is at 1.10*)
ARG NGINX_VERSION=1.13*
# requirements
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y ca-certificates inotify-tools gnupg2 && \
rm -rf /var/lib/apt/lists/*
# reality check
RUN case $NGINX_PACKAGE in \
nginx) \
echo "+-- building with nginx.org package: ${NGINX_PACKAGE}"; \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list; \
echo "deb http://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list; \
;; \
nginx-light|nginx-full|nginx-extras) \
echo "+-- building with Debian-provided package: ${NGINX_PACKAGE}"; \
......@@ -52,7 +57,7 @@ RUN case $NGINX_PACKAGE in \
esac
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y ca-certificates "${NGINX_PACKAGE}"="${NGINX_VERSION}" inotify-tools && \
apt-get install -y "${NGINX_PACKAGE}"="${NGINX_VERSION}" && \
rm -rf /var/lib/apt/lists/*
# we might need to install some packages, but doing this in the entrypoint doesn't make any sense
......
......@@ -8,9 +8,9 @@ The image can be built with either [`nginx` package installed from `nginx.org` r
By default, `nginx` package from `nginx.org` is being installed. If `NGINX_PACKAGE` is set to anything else than `nginx`, packages from default Debian repositories are used instead.
The `NGINX_VERSION` build argument controls the `nginx` package version that is going to be installed. By default, version `1.11*` (the latest) is used.
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.6*`.**
**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*`.**
## Environment variables
......@@ -24,18 +24,18 @@ The `NGINX_VERSION` build argument controls the `nginx` package version that is
### Examples
Building the image with `nginx` package from `nginx.org`, version `1.11.x` (i.e. the default):
Building the image with `nginx` package from `nginx.org`, version `1.13.x` (i.e. the default):
```bash
docker build ./
# equivalent to
docker build --build-arg=NGINX_PACKAGE=nginx --build-arg=NGINX_VERSION=1.11* --no-cache ./
docker build --build-arg=NGINX_PACKAGE=nginx --build-arg=NGINX_VERSION=1.13* --no-cache ./
```
Building the image with `nginx-extras` package from the Debian repository, version `1.6*`:
Building the image with `nginx-extras` package from the Debian repository, version `1.10*`:
```
docker build --build-arg=NGINX_PACKAGE=nginx-extras --build-arg=NGINX_VERSION=1.6* --no-cache ./
docker build --build-arg=NGINX_PACKAGE=nginx-extras --build-arg=NGINX_VERSION=1.10* --no-cache ./
```
## Operation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment