diff --git a/openresty/1.25.3.2-0-1-focal/build/Dockerfile b/openresty/1.25.3.2-0-1-focal/build/Dockerfile index 6c48f1549..d89c5bd91 100644 --- a/openresty/1.25.3.2-0-1-focal/build/Dockerfile +++ b/openresty/1.25.3.2-0-1-focal/build/Dockerfile @@ -60,6 +60,8 @@ ARG RESTY_EVAL_PRE_CONFIGURE="" ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE="" ARG RESTY_EVAL_POST_MAKE="" +ARG CONTAINER_PACKAGE_URL + # These are not intended to be user-specified ARG _RESTY_CONFIG_DEPS="--with-pcre \ @@ -88,7 +90,10 @@ LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}" -COPY tmp/* /tmp/ +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 DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -112,7 +117,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ && 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 \ + # && 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 \ && cd openssl-${RESTY_OPENSSL_VERSION} \ && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ @@ -133,7 +138,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ && make -j${RESTY_J} \ && make -j${RESTY_J} install_sw \ && cd /tmp \ - && 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 \ + # && 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 \ && echo "${RESTY_PCRE_SHA256} pcre-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \ && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ && cd /tmp/pcre-${RESTY_PCRE_VERSION} \ @@ -146,7 +151,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ && make -j${RESTY_J} \ && make -j${RESTY_J} install \ && cd /tmp \ - && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ + # && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ && tar xzf openresty-${RESTY_VERSION}.tar.gz \ && cd /tmp/openresty-${RESTY_VERSION} \ && if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \ @@ -158,7 +163,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ - && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ + # && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ && cd luarocks-${RESTY_LUAROCKS_VERSION} \ && ./configure \ @@ -191,6 +196,8 @@ ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/ 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" +RUN bash /tmp/default.sh + # Copy nginx configuration files COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf diff --git a/openresty/1.25.3.2-0-1-focal/build/module.json b/openresty/1.25.3.2-0-1-focal/build/module.json index e69de29bb..f962eac31 100644 --- a/openresty/1.25.3.2-0-1-focal/build/module.json +++ b/openresty/1.25.3.2-0-1-focal/build/module.json @@ -0,0 +1,37 @@ +[ + { + "name":"brotli", + "script":"unzip -o /tmp/ngx_brotli.zip -d /tmp", + "packages":[], + "params": "--add-module=/tmp/ngx_brotli", + "enable":false + }, + { + "name":"rtmp", + "script":"unzip -o /tmp/nginx-rtmp-module.zip -d /tmp", + "packages":[], + "params": "--add-module=/tmp/nginx-rtmp-module", + "enable":false + }, + { + "name":"web_dav", + "script":"unzip -o /tmp/nginx-dav-ext-module.zip -d /tmp", + "packages":[], + "params": "--with-http_dav_module --add-module=/tmp/nginx-dav-ext-module", + "enable":false + }, + { + "name":"geoip2", + "script":"unzip -o /tmp/ngx_http_geoip2_module.zip -d /tmp && unzip -o /tmp/libmaxminddb.zip -d /tmp && cd /tmp/libmaxminddb && ./configure && make && make install", + "packages":[], + "params": "--add-module=/tmp/ngx_http_geoip2_module", + "enable":false + }, + { + "name":"http_substitutions_filter", + "script":"unzip -o /tmp/ngx_http_substitutions_filter_module.zip -d /tmp", + "packages":[], + "params": "--add-module=/tmp/ngx_http_substitutions_filter_module", + "enable":false + } +] \ No newline at end of file diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/default.sh b/openresty/1.25.3.2-0-1-focal/build/tmp/default.sh new file mode 100644 index 000000000..9a7de34f4 --- /dev/null +++ b/openresty/1.25.3.2-0-1-focal/build/tmp/default.sh @@ -0,0 +1,19 @@ +apt-get install -y --no-install-recommends libsqlite3-dev git python2 libmaxminddb0\ + && ln -s /usr/bin/python2 /usr/bin/python \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && unzip /tmp/libmaxminddb.zip -d /tmp \ + && cd /tmp/libmaxminddb \ + && ./configure \ + && make \ + && make install \ + && unzip /tmp/libinjection-master.zip -d /tmp \ + && cd /tmp/libinjection-master \ + && 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-master/src/libinjection.so /usr/local/openresty/1pwaf/libraries/libinjection.so \ + && cp /tmp/lsqlite3/lsqlite3.so /usr/local/openresty/luajit/lib/lua/5.1/lsqlite3.so diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/libinjection-master.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/libinjection-master.zip new file mode 100644 index 000000000..a5e211d95 Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/libinjection-master.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/libmaxminddb.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/libmaxminddb.zip new file mode 100644 index 000000000..6c4f1b212 Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/libmaxminddb.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/lsqlite3.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/lsqlite3.zip new file mode 100644 index 000000000..a12b87510 Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/lsqlite3.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/luarocks-3.11.0.tar.gz b/openresty/1.25.3.2-0-1-focal/build/tmp/luarocks-3.11.0.tar.gz new file mode 100644 index 000000000..906d63c81 Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/luarocks-3.11.0.tar.gz differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/nginx-dav-ext-module.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/nginx-dav-ext-module.zip new file mode 100644 index 000000000..6b6d5e70d Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/nginx-dav-ext-module.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/nginx-rtmp-module.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/nginx-rtmp-module.zip new file mode 100644 index 000000000..15a10470b Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/nginx-rtmp-module.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_brotli.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_brotli.zip new file mode 100644 index 000000000..3117ff3ca Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_brotli.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_http_geoip2_module.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_http_geoip2_module.zip new file mode 100644 index 000000000..e383d5aa1 Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_http_geoip2_module.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_http_substitutions_filter_module.zip b/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_http_substitutions_filter_module.zip new file mode 100644 index 000000000..473293613 Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/ngx_http_substitutions_filter_module.zip differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/openresty-1.25.3.2.tar.gz b/openresty/1.25.3.2-0-1-focal/build/tmp/openresty-1.25.3.2.tar.gz new file mode 100644 index 000000000..4eefa16fc Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/openresty-1.25.3.2.tar.gz differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/openssl-1.1.1w.tar.gz b/openresty/1.25.3.2-0-1-focal/build/tmp/openssl-1.1.1w.tar.gz new file mode 100644 index 000000000..9547637cf Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/openssl-1.1.1w.tar.gz differ diff --git a/openresty/1.25.3.2-0-1-focal/build/tmp/pcre-8.45.tar.gz b/openresty/1.25.3.2-0-1-focal/build/tmp/pcre-8.45.tar.gz new file mode 100644 index 000000000..02233ce2a Binary files /dev/null and b/openresty/1.25.3.2-0-1-focal/build/tmp/pcre-8.45.tar.gz differ diff --git a/openresty/1.25.3.2-0-1-focal/docker-compose.yml b/openresty/1.25.3.2-0-1-focal/docker-compose.yml index 238f3266a..377ac094b 100644 --- a/openresty/1.25.3.2-0-1-focal/docker-compose.yml +++ b/openresty/1.25.3.2-0-1-focal/docker-compose.yml @@ -6,6 +6,7 @@ services: - PANEL_OPENRESTY_VERSION=1.25.3.2-0-1-focal - RESTY_CONFIG_OPTIONS_MORE=${RESTY_CONFIG_OPTIONS_MORE} - RESTY_ADD_PACKAGE_BUILDDEPS=${RESTY_ADD_PACKAGE_BUILDDEPS} + - CONTAINER_PACKAGE_URL=${CONTAINER_PACKAGE_URL} image: 1panel/openresty:1.25.3.2-0-1-focal container_name: ${CONTAINER_NAME} restart: always