mirror of
https://github.com/pooneyy/1Panel-Appstore.git
synced 2026-03-23 13:29:39 +08:00
feat: 增加 OpenResty 默认模块
This commit is contained in:
parent
af97fd1b23
commit
f71f402fbe
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
]
|
||||
19
openresty/1.25.3.2-0-1-focal/build/tmp/default.sh
Normal file
19
openresty/1.25.3.2-0-1-focal/build/tmp/default.sh
Normal file
@ -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
|
||||
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/libinjection-master.zip
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/libinjection-master.zip
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/libmaxminddb.zip
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/libmaxminddb.zip
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/lsqlite3.zip
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/lsqlite3.zip
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/luarocks-3.11.0.tar.gz
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/luarocks-3.11.0.tar.gz
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/nginx-dav-ext-module.zip
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/nginx-dav-ext-module.zip
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/nginx-rtmp-module.zip
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/nginx-rtmp-module.zip
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/ngx_brotli.zip
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/ngx_brotli.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/openresty-1.25.3.2.tar.gz
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/openresty-1.25.3.2.tar.gz
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/openssl-1.1.1w.tar.gz
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/openssl-1.1.1w.tar.gz
Normal file
Binary file not shown.
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/pcre-8.45.tar.gz
Normal file
BIN
openresty/1.25.3.2-0-1-focal/build/tmp/pcre-8.45.tar.gz
Normal file
Binary file not shown.
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user