@@ -21,6 +21,7 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
21
21
inotify-tools \
22
22
curl \
23
23
libyajl-dev \
24
+ libgeoip1 \
24
25
libgeoip-dev \
25
26
dh-autoreconf \
26
27
libcurl4-gnutls-dev \
@@ -38,6 +39,7 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
38
39
&& cd /usr/src \
39
40
# Create log and cache directories
40
41
&& mkdir -p \
42
+ /etc/nginx \
41
43
/var/log/nginx \
42
44
/var/cache/nginx \
43
45
&& git clone https://github.com/SpiderLabs/ModSecurity.git --branch ${MODSECURITY_VERSION} --single-branch \
@@ -62,6 +64,11 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
62
64
&& curl https://people.freebsd.org/~osa/ngx_http_redis-${NGX_HTTP_REDIS}.tar.gz | tar xz \
63
65
&& git clone https://github.com/vozlt/nginx-module-vts.git --branch ${NGINX_MODULE_VTS_VERSION} --single-branch \
64
66
&& curl -L https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz | tar xz \
67
+ # download GeoIP databases
68
+ && wget -O /etc/nginx/GeoIP.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz \
69
+ && wget -O /etc/nginx/GeoLiteCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz \
70
+ && gunzip /etc/nginx/GeoIP.dat.gz \
71
+ && gunzip /etc/nginx/GeoLiteCity.dat.gz \
65
72
# ## Disable Lua module until OpenSSL v1.1 compatible ###
66
73
# && git clone https://github.com/simpl/ngx_devel_kit.git --branch ${NGX_DEVEL_KIT_VERSION} --single-branch \
67
74
# && git clone https://github.com/openresty/lua-nginx-module.git --branch ${LUA_NGINX_MODULE_VERSION} --single-branch \
@@ -113,6 +120,7 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
113
120
--with-http_auth_request_module \
114
121
--with-http_dav_module \
115
122
--with-http_flv_module \
123
+ --with-http_geoip_module=dynamic \
116
124
--with-http_gunzip_module \
117
125
--with-http_gzip_static_module \
118
126
--with-http_mp4_module \
@@ -146,6 +154,8 @@ RUN adduser --system --disabled-password --home /var/cache/nginx --shell /sbin/n
146
154
wget \
147
155
git \
148
156
curl \
157
+ libgeoip-dev \
158
+ libpcre3-dev \
149
159
&& apt-get clean \
150
160
&& apt-get autoremove -y \
151
161
&& rm -rf /var/lib/apt/lists/* \
0 commit comments