1
1
FROM debian:stretch-slim
2
2
3
3
ENV \
4
+ # http://nginx.org/en/CHANGES
5
+ NGINX_VERSION=1.15.9 \
4
6
# LUAJIT_VERSION=v2.0.5 \
5
7
# LUA_NGINX_MODULE_VERSION=v0.10.11 \
8
+ # https://github.com/openresty/echo-nginx-module/releases
6
9
ECHO_NGINX_MODULE_VERSION=v0.61 \
7
10
MODSECURITY_VERSION=v3.0.0-rc1 \
8
11
MODSECURITY_NGINX_VERSION=master \
9
12
MODSECURITY_NGINX_COMMIT=a2a5858d249222938c2f5e48087a922c63d7f9d8 \
10
- NGINSCRIPT_VERSION=0.2.2 \
13
+ # http://hg.nginx.org/njs/tags
14
+ NGINSCRIPT_VERSION=0.2.8 \
11
15
NGX_BROTLI_VERSION=master \
12
16
NGX_DEVEL_KIT_VERSION=v0.3.0 \
13
17
NGX_HTTP_REDIS=0.3.8 \
14
18
NGINX_MODULE_VTS_VERSION=v0.1.18 \
15
- NGINX_VERSION=1.14.0 \
16
19
REDIS2_NGINX_MODULE_VERSION=v0.14 \
17
20
SET_MISC_NGINX_MODULE_VERSION=v0.31 \
18
- SRCACHE_NGINX_MODULE_VERSION=v0.31
21
+ SRCACHE_NGINX_MODULE_VERSION=v0.31 \
22
+ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
19
23
20
24
RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/nologin --group nginx \
21
25
&& apt-get update \
22
- && apt-get install -y \
26
+ && apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
27
+ && \
28
+ found='' ; \
29
+ for server in \
30
+ ha.pool.sks-keyservers.net \
31
+ hkp://keyserver.ubuntu.com:80 \
32
+ hkp://p80.pool.sks-keyservers.net:80 \
33
+ pgp.mit.edu \
34
+ ; do \
35
+ echo "Fetching GPG key $NGINX_GPGKEY from $server" ; \
36
+ apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
37
+ done; \
38
+ test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
39
+ apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
40
+ && echo "deb https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
41
+ && echo "deb-src https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
42
+ && apt-get update \
43
+ && apt-get install --no-install-recommends --no-install-suggests -y \
23
44
inotify-tools \
24
45
curl \
25
46
libyajl-dev \
@@ -48,7 +69,7 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
48
69
&& cd ModSecurity \
49
70
&& sh build.sh \
50
71
&& git submodule update --init \
51
- && ./configure \
72
+ && ./configure --disable-doxygen-doc --disable-examples --disable-dependency-tracking \
52
73
&& make \
53
74
&& make install \
54
75
&& cd .. \
@@ -66,11 +87,6 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
66
87
&& curl https://people.freebsd.org/~osa/ngx_http_redis-${NGX_HTTP_REDIS}.tar.gz | tar xz \
67
88
&& git clone https://github.com/vozlt/nginx-module-vts.git --branch ${NGINX_MODULE_VTS_VERSION} --single-branch \
68
89
&& curl -L https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz | tar xz \
69
- # download GeoIP databases
70
- && wget -O /etc/nginx/GeoIP.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz \
71
- && wget -O /etc/nginx/GeoLiteCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz \
72
- && gunzip /etc/nginx/GeoIP.dat.gz \
73
- && gunzip /etc/nginx/GeoLiteCity.dat.gz \
74
90
# Nginx Devel Kit
75
91
&& git clone https://github.com/simpl/ngx_devel_kit.git --branch ${NGX_DEVEL_KIT_VERSION} --single-branch \
76
92
# Set Misc Nginx Module
@@ -175,7 +191,8 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
175
191
&& ln -sf /dev/stdout /var/log/nginx/access.log \
176
192
&& ln -sf /dev/stderr /var/log/nginx/error.log
177
193
178
- COPY entrypoint.sh /entrypoint.sh
194
+ COPY entrypoint.sh /
195
+ COPY files/geoip/ /etc/nginx/
179
196
RUN chmod +x /entrypoint.sh
180
197
ENTRYPOINT ["/entrypoint.sh" ]
181
198
0 commit comments