Update Dockerfile
Browse files- Dockerfile +27 -181
Dockerfile
CHANGED
@@ -1,181 +1,27 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
ARG
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
--with-http_auth_request_module \
|
29 |
-
--with-http_dav_module \
|
30 |
-
--with-http_flv_module \
|
31 |
-
--with-http_geoip_module=dynamic \
|
32 |
-
--with-http_gunzip_module \
|
33 |
-
--with-http_gzip_static_module \
|
34 |
-
--with-http_image_filter_module=dynamic \
|
35 |
-
--with-http_mp4_module \
|
36 |
-
--with-http_random_index_module \
|
37 |
-
--with-http_realip_module \
|
38 |
-
--with-http_secure_link_module \
|
39 |
-
--with-http_slice_module \
|
40 |
-
--with-http_ssl_module \
|
41 |
-
--with-http_stub_status_module \
|
42 |
-
--with-http_sub_module \
|
43 |
-
--with-http_v2_module \
|
44 |
-
--with-http_xslt_module=dynamic \
|
45 |
-
--with-ipv6 \
|
46 |
-
--with-mail \
|
47 |
-
--with-mail_ssl_module \
|
48 |
-
--with-md5-asm \
|
49 |
-
--with-sha1-asm \
|
50 |
-
--with-stream \
|
51 |
-
--with-stream_ssl_module \
|
52 |
-
--with-threads \
|
53 |
-
"
|
54 |
-
ARG RESTY_CONFIG_OPTIONS_MORE=""
|
55 |
-
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
|
56 |
-
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"
|
57 |
-
|
58 |
-
ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
|
59 |
-
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
|
60 |
-
ARG RESTY_EVAL_PRE_CONFIGURE=""
|
61 |
-
ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE=""
|
62 |
-
ARG RESTY_EVAL_POST_MAKE=""
|
63 |
-
|
64 |
-
# These are not intended to be user-specified
|
65 |
-
ARG _RESTY_CONFIG_DEPS="--with-pcre \
|
66 |
-
--with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl/include' \
|
67 |
-
--with-ld-opt='-L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl/lib -Wl,-rpath,/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl/lib' \
|
68 |
-
"
|
69 |
-
|
70 |
-
LABEL resty_image_base="${RESTY_IMAGE_BASE}"
|
71 |
-
LABEL resty_image_tag="${RESTY_IMAGE_TAG}"
|
72 |
-
LABEL resty_version="${RESTY_VERSION}"
|
73 |
-
LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}"
|
74 |
-
LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
|
75 |
-
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
|
76 |
-
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
|
77 |
-
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
|
78 |
-
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
|
79 |
-
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
|
80 |
-
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
|
81 |
-
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
|
82 |
-
LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}"
|
83 |
-
LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
|
84 |
-
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
|
85 |
-
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
|
86 |
-
LABEL resty_eval_post_download_pre_configure="${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}"
|
87 |
-
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
|
88 |
-
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
|
89 |
-
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
|
90 |
-
|
91 |
-
|
92 |
-
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
93 |
-
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
94 |
-
build-essential \
|
95 |
-
ca-certificates \
|
96 |
-
curl \
|
97 |
-
gettext-base \
|
98 |
-
libgd-dev \
|
99 |
-
libgeoip-dev \
|
100 |
-
libncurses5-dev \
|
101 |
-
libperl-dev \
|
102 |
-
libreadline-dev \
|
103 |
-
libxslt1-dev \
|
104 |
-
make \
|
105 |
-
perl \
|
106 |
-
unzip \
|
107 |
-
wget \
|
108 |
-
zlib1g-dev \
|
109 |
-
${RESTY_ADD_PACKAGE_BUILDDEPS} \
|
110 |
-
${RESTY_ADD_PACKAGE_RUNDEPS} \
|
111 |
-
&& cd /tmp \
|
112 |
-
&& wget https://www.gmssl.cn/gmssl/down/gmssl_openssl_1.1_b2024_x64_1.tar.gz \
|
113 |
-
&& mkdir -p /usr/local/openresty/openssl \
|
114 |
-
&& tar xzfm gmssl_openssl_1.1_b2024_x64_1.tar.gz -C /usr/local/ \
|
115 |
-
&& cp /usr/local/gmssl/* /usr/local/openresty/openssl -r \
|
116 |
-
&& cd /tmp \
|
117 |
-
&& curl -fSL https://downloads.sourceforge.net/project/pcre/pcre/${RESTY_PCRE_VERSION}/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \
|
118 |
-
&& echo "${RESTY_PCRE_SHA256} pcre-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \
|
119 |
-
&& tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \
|
120 |
-
&& cd /tmp/pcre-${RESTY_PCRE_VERSION} \
|
121 |
-
&& ./configure \
|
122 |
-
--prefix=/usr/local/openresty/pcre \
|
123 |
-
--disable-cpp \
|
124 |
-
--enable-utf \
|
125 |
-
--enable-unicode-properties \
|
126 |
-
${RESTY_PCRE_BUILD_OPTIONS} \
|
127 |
-
&& make -j${RESTY_J} \
|
128 |
-
&& make -j${RESTY_J} install \
|
129 |
-
&& cd /tmp \
|
130 |
-
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
|
131 |
-
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
|
132 |
-
&& cd /tmp/openresty-${RESTY_VERSION} \
|
133 |
-
&& sed -i 's/\$OPENSSL\/\.openssl\//\$OPENSSL\//g' ./bundle/nginx-1.21.4/auto/lib/openssl/conf \
|
134 |
-
&& if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \
|
135 |
-
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
|
136 |
-
&& make -j${RESTY_J} \
|
137 |
-
&& make -j${RESTY_J} install \
|
138 |
-
&& cd /tmp \
|
139 |
-
&& rm -rf \
|
140 |
-
openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \
|
141 |
-
pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \
|
142 |
-
openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \
|
143 |
-
&& curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
|
144 |
-
&& tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
|
145 |
-
&& cd luarocks-${RESTY_LUAROCKS_VERSION} \
|
146 |
-
&& ./configure \
|
147 |
-
--prefix=/usr/local/openresty/luajit \
|
148 |
-
--with-lua=/usr/local/openresty/luajit \
|
149 |
-
--lua-suffix=jit-2.1.0-beta3 \
|
150 |
-
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \
|
151 |
-
&& make build \
|
152 |
-
&& make install \
|
153 |
-
&& cd /tmp \
|
154 |
-
&& if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \
|
155 |
-
&& rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
|
156 |
-
&& if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \
|
157 |
-
&& DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
|
158 |
-
&& mkdir -p /var/run/openresty \
|
159 |
-
&& ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
|
160 |
-
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log
|
161 |
-
|
162 |
-
# Add additional binaries into PATH for convenience
|
163 |
-
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
|
164 |
-
|
165 |
-
# Add LuaRocks paths
|
166 |
-
# If OpenResty changes, these may need updating:
|
167 |
-
# /usr/local/openresty/bin/resty -e 'print(package.path)'
|
168 |
-
# /usr/local/openresty/bin/resty -e 'print(package.cpath)'
|
169 |
-
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"
|
170 |
-
|
171 |
-
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"
|
172 |
-
|
173 |
-
# Copy nginx configuration files
|
174 |
-
COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
|
175 |
-
COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf
|
176 |
-
|
177 |
-
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
|
178 |
-
|
179 |
-
# Use SIGQUIT instead of default SIGTERM to cleanly drain requests
|
180 |
-
# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls
|
181 |
-
STOPSIGNAL SIGQUIT
|
|
|
1 |
+
FROM debian:12
|
2 |
+
|
3 |
+
LABEL org.opencontainers.image.authors="Release Engineering Team <devops@tech.wbsrv.ru>"
|
4 |
+
|
5 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
RUN set -x \
|
8 |
+
&& apt-get update \
|
9 |
+
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
10 |
+
ca-certificates lsb-release curl \
|
11 |
+
&& curl -o /etc/apt/trusted.gpg.d/angie-signing.gpg \
|
12 |
+
https://angie.software/keys/angie-signing.gpg \
|
13 |
+
&& echo "deb https://download.angie.software/angie/debian/ `lsb_release \
|
14 |
+
-cs` main" > /etc/apt/sources.list.d/angie.list \
|
15 |
+
&& apt-get update \
|
16 |
+
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
17 |
+
angie angie-module-geoip2 angie-module-njs \
|
18 |
+
&& apt-get remove --auto-remove --purge -y lsb-release \
|
19 |
+
&& rm -Rf /var/lib/apt/lists \
|
20 |
+
/etc/apt/sources.list.d/angie.list \
|
21 |
+
/etc/apt/trusted.gpg.d/angie-signing.gpg \
|
22 |
+
&& ln -sf /dev/stdout /var/log/angie/access.log \
|
23 |
+
&& ln -sf /dev/stderr /var/log/angie/error.log
|
24 |
+
|
25 |
+
EXPOSE 80
|
26 |
+
|
27 |
+
CMD ["angie", "-g", "daemon off;"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|