init dockerfile
This commit is contained in:
74
Dockerfile
Normal file
74
Dockerfile
Normal file
@@ -0,0 +1,74 @@
|
||||
ARG IMAGE_BASE_TAG=buster-slim
|
||||
|
||||
FROM debian:${IMAGE_BASE_TAG}
|
||||
|
||||
ARG RESTY_VERSION="1.19.3.1"
|
||||
ARG RESTY_PCRE_VERSION="8.44"
|
||||
ARG RESTY_OPENSSL_VERSION="1.1.1k"
|
||||
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
|
||||
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
|
||||
|
||||
RUN apt-get update && apt-get -y upgrade \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install all required packages
|
||||
RUN apt-get update && \
|
||||
apt-get -y install \
|
||||
wget \
|
||||
curl \
|
||||
unzip \
|
||||
gzip \
|
||||
zlib1g-dev \
|
||||
libldap2-dev\
|
||||
libgd-dev \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
WORKDIR /tmp
|
||||
# Get the openresty /nginx source
|
||||
RUN cd /tmp
|
||||
#RUN curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty.tar.gz \
|
||||
# && tar xvf openresty.tar.gz
|
||||
|
||||
RUN wget https://openresty.org/download/openresty-1.19.3.1.tar.gz -O openresty.tar.gz \
|
||||
&& tar xvf openresty.tar.gz && mv openresty-1.19.3.1 openresty
|
||||
RUN ls
|
||||
RUN wget https://github.com/kvspb/nginx-auth-ldap/archive/refs/heads/master.zip && unzip -o master.zip && rm master.zip
|
||||
RUN ls
|
||||
RUN wget https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -O pcre-${RESTY_PCRE_VERSION}.tar.gz \
|
||||
&& tar xvf pcre-${RESTY_PCRE_VERSION}.tar.gz
|
||||
|
||||
|
||||
RUN mv pcre-${RESTY_PCRE_VERSION} pcre && rm pcre-${RESTY_PCRE_VERSION}.tar.gz
|
||||
RUN ls
|
||||
|
||||
|
||||
#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 \
|
||||
|
||||
RUN ls /tmp
|
||||
RUN ls /tmp/nginx-auth-ldap-master
|
||||
|
||||
|
||||
RUN wget "${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 \
|
||||
&& mv openssl-${RESTY_OPENSSL_VERSION} openssl
|
||||
WORKDIR /tmp/openresty
|
||||
RUN ./configure --with-pcre=/tmp/pcre --with-openssl=/tmp/openssl --add-module=/tmp/nginx-auth-ldap-master \
|
||||
--with-stream \
|
||||
--with-http_ssl_module \
|
||||
--with-http_image_filter_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_sub_module \
|
||||
--with-mail \
|
||||
--with-stream_ssl_module
|
||||
RUN make && make install
|
||||
RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
|
||||
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log
|
||||
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
|
||||
|
||||
# Use SIGQUIT instead of default SIGTERM to cleanly drain requests
|
||||
# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls
|
||||
STOPSIGNAL SIGQUIT
|
||||
Reference in New Issue
Block a user