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,15 +11,15 @@ 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"
19
18
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source/old/1.1.1"
20
19
ARG RESTY_PCRE_VERSION="8.45"
21
20
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
22
21
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
23
- ARG RESTY_J="1 "
22
+ ARG RESTY_J="2 "
24
23
ARG RESTY_CONFIG_OPTIONS="\
25
24
--with-compat \
26
25
--with-file-aio \
@@ -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,9 +50,9 @@ 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' \
53
+ --add-module=/usr/local/src/ngx_waf \
54
54
"
55
- ARG RESTY_CONFIG_OPTIONS_MORE="--add-module=/tmp/ngx_waf "
55
+ ARG RESTY_CONFIG_OPTIONS_MORE=""
56
56
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
57
57
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"
58
58
@@ -89,11 +89,10 @@ LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
89
89
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
90
90
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
91
91
92
- COPY ./ ngx_waf /tmp /ngx_waf
92
+ COPY ngx_waf /usr/local/src /ngx_waf
93
93
94
94
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
95
95
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
96
- git \
97
96
build-essential \
98
97
ca-certificates \
99
98
curl \
@@ -109,19 +108,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
109
108
unzip \
110
109
wget \
111
110
zlib1g-dev \
112
- libcurl4-openssl-dev \
113
- libmodsecurity-dev \
114
- libmodsecurity3 \
115
111
${RESTY_ADD_PACKAGE_BUILDDEPS} \
116
112
${RESTY_ADD_PACKAGE_RUNDEPS} \
117
- && git clone -b v1.7.15 https://github.com/DaveGamble/cJSON.git /tmp/ngx_waf/lib/cjson \
118
- && git clone -b v2.3.0 https://github.com/troydhanson/uthash.git /tmp/ngx_waf/lib/uthash \
119
- && git clone https://github.com/jedisct1/libsodium.git --branch 1.0.18-RELEASE /tmp/libsodium \
120
- && cd /tmp/libsodium \
121
- && ./configure --prefix=/usr/local/libsodium --with-pic \
122
- && make \
123
- && make check \
124
- && make install \
125
113
&& cd /tmp \
126
114
&& if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \
127
115
&& curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
@@ -161,7 +149,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
161
149
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
162
150
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
163
151
&& cd /tmp/openresty-${RESTY_VERSION} \
164
- && export LIB_SODIUM=/usr/local/libsodium \
165
152
&& if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \
166
153
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
167
154
&& make -j${RESTY_J} \
@@ -177,7 +164,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
177
164
&& ./configure \
178
165
--prefix=/usr/local/openresty/luajit \
179
166
--with-lua=/usr/local/openresty/luajit \
180
- --lua-suffix=jit-2.1.0-beta3 \
181
167
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \
182
168
&& make build \
183
169
&& make install \
@@ -197,7 +183,7 @@ ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/
197
183
# If OpenResty changes, these may need updating:
198
184
# /usr/local/openresty/bin/resty -e 'print(package.path)'
199
185
# /usr/local/openresty/bin/resty -e 'print(package.cpath)'
200
- 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"
201
187
202
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"
203
189
0 commit comments