1
0
Fork 0

feat: update openresty dockerfile

This commit is contained in:
zhengkunwang223 2025-05-07 14:08:34 +08:00 committed by CityFun
parent dcfe98a39a
commit a8c1212fe2
2 changed files with 7 additions and 18 deletions

View File

@ -4,6 +4,7 @@
ARG RESTY_IMAGE_BASE="ubuntu"
ARG RESTY_IMAGE_TAG="focal"
ARG CONTAINER_PACKAGE_URL
ARG PANEL_OPENRESTY_VERSION
FROM 1panel/openresty:${PANEL_OPENRESTY_VERSION} as panel-openresty
@ -114,8 +115,8 @@ LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
COPY tmp /tmp
#RUN sed -i "s|http://archive.ubuntu.com/ubuntu/|${CONTAINER_PACKAGE_URL}|g" /etc/apt/sources.list \
# && sed -i "s|http://security.ubuntu.com/ubuntu/|${CONTAINER_PACKAGE_URL}|g" /etc/apt/sources.list
RUN sed -i "s|http://archive.ubuntu.com/ubuntu/|${CONTAINER_PACKAGE_URL}|g" /etc/apt/sources.list \
&& sed -i "s|http://security.ubuntu.com/ubuntu/|${CONTAINER_PACKAGE_URL}|g" /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
@ -134,9 +135,11 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
unzip \
wget \
zlib1g-dev \
git \
${RESTY_ADD_PACKAGE_BUILDDEPS} \
${RESTY_ADD_PACKAGE_RUNDEPS} \
&& cd /tmp \
&& bash /tmp/pre.sh \
&& if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \
# && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
&& tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
@ -209,6 +212,7 @@ COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf
RUN bash /tmp/default.sh
COPY --from=panel-openresty /usr/local/openresty/1pwaf /usr/local/openresty/1pwaf
COPY --from=panel-openresty /usr/local/openresty/1pwaf/libraries/libmaxminddb.so /usr/local/openresty/1pwaf/libraries/libmaxminddb.so
COPY --from=panel-openresty /usr/local/openresty/1pwaf/libraries/libinjection.so /usr/local/openresty/1pwaf/libraries/libinjection.so

View File

@ -2,19 +2,4 @@ apt-get install -y --no-install-recommends libsqlite3-dev git python3 automake a
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& luarocks install luafilesystem \
&& mkdir -p /usr/local/openresty/1pwaf/libraries
# && unzip /tmp/libmaxminddb.zip -d /tmp \
# && cd /tmp/libmaxminddb \
# && ./configure \
# && make \
# && make install \
# && unzip /tmp/libinjection-main.zip -d /tmp \
# && cd /tmp/libinjection-main \
# && make all \
# && unzip /tmp/lsqlite3.zip -d /tmp \
# && cd /tmp/lsqlite3 \
# && make all \
# && mkdir -p /usr/local/openresty/1pwaf/libraries/ \
# && cp /usr/local/lib/libmaxminddb.so.0.0.7 /usr/local/openresty/1pwaf/libraries/libmaxminddb.so \
# && cp /tmp/libinjection-main/src/.libs/libinjection.so.1.2.9 /usr/local/openresty/1pwaf/libraries/libinjection.so \
# && cp /tmp/lsqlite3/lsqlite3.so /usr/local/openresty/luajit/lib/lua/5.1/lsqlite3.so
&& mkdir -p /usr/local/openresty/1pwaf/libraries