3
3
4
4
ARG RESTY_IMAGE_BASE="ubuntu"
5
5
ARG RESTY_IMAGE_TAG="focal"
6
- ARG LIB_SODIUM_VER=1.0.18-RELEASE
7
6
8
7
FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG}
9
8
@@ -12,7 +11,7 @@ LABEL maintainer="Evan Wies <evan@neomantra.net>"
12
11
# Docker Build Arguments
13
12
ARG RESTY_IMAGE_BASE="ubuntu"
14
13
ARG RESTY_IMAGE_TAG="focal"
15
- ARG RESTY_VERSION="1.25.3.1 "
14
+ ARG RESTY_VERSION="1.25.3.2 "
16
15
ARG RESTY_LUAROCKS_VERSION="3.11.0"
17
16
ARG RESTY_OPENSSL_VERSION="1.1.1w"
18
17
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
@@ -41,6 +40,7 @@ ARG RESTY_CONFIG_OPTIONS="\
41
40
--with-http_stub_status_module \
42
41
--with-http_sub_module \
43
42
--with-http_v2_module \
43
+ --with-http_v3_module \
44
44
--with-http_xslt_module=dynamic \
45
45
--with-ipv6 \
46
46
--with-mail \
@@ -50,8 +50,7 @@ ARG RESTY_CONFIG_OPTIONS="\
50
50
--with-stream \
51
51
--with-stream_ssl_module \
52
52
--with-threads \
53
- --with-cc-opt='-fstack-protector-strong' \
54
- --add-module=/usr/local/src/ngx_waf \
53
+ --add-module=/usr/local/src/ngx_waf-10.1.2 \
55
54
"
56
55
ARG RESTY_CONFIG_OPTIONS_MORE=""
57
56
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
@@ -90,11 +89,10 @@ LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
90
89
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
91
90
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
92
91
93
- COPY ngx_waf /usr/local/src/ngx_waf
92
+ COPY ngx_waf-10.1.2 /usr/local/src/ngx_waf-10.1.2
94
93
95
94
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
96
95
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
97
- git \
98
96
build-essential \
99
97
ca-certificates \
100
98
curl \
@@ -110,19 +108,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
110
108
unzip \
111
109
wget \
112
110
zlib1g-dev \
113
- libcurl4-openssl-dev \
114
- libmodsecurity-dev \
115
- libmodsecurity3 \
116
111
${RESTY_ADD_PACKAGE_BUILDDEPS} \
117
112
${RESTY_ADD_PACKAGE_RUNDEPS} \
118
- && git clone -b v1.7.15 https://github.com/DaveGamble/cJSON.git /tmp/ngx_waf/lib/cjson \
119
- && git clone -b v2.3.0 https://github.com/troydhanson/uthash.git /tmp/ngx_waf/lib/uthash \
120
- && git clone https://github.com/jedisct1/libsodium.git --branch 1.0.18-RELEASE /tmp/libsodium \
121
- && cd /tmp/libsodium \
122
- && ./configure --prefix=/usr/local/libsodium --with-pic \
123
- && make \
124
- && make check \
125
- && make install \
126
113
&& cd /tmp \
127
114
&& if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \
128
115
&& curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
@@ -162,7 +149,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
162
149
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
163
150
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
164
151
&& cd /tmp/openresty-${RESTY_VERSION} \
165
- && export LIB_SODIUM=/usr/local/libsodium \
166
152
&& if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \
167
153
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
168
154
&& make -j${RESTY_J} \
@@ -178,7 +164,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
178
164
&& ./configure \
179
165
--prefix=/usr/local/openresty/luajit \
180
166
--with-lua=/usr/local/openresty/luajit \
181
- --lua-suffix=jit-2.1.0-beta3 \
182
167
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \
183
168
&& make build \
184
169
&& make install \
@@ -198,7 +183,7 @@ ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/
198
183
# If OpenResty changes, these may need updating:
199
184
# /usr/local/openresty/bin/resty -e 'print(package.path)'
200
185
# /usr/local/openresty/bin/resty -e 'print(package.cpath)'
201
- ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3 /?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua"
186
+ ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua"
202
187
203
188
ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so"
204
189
0 commit comments