minor tweaks
This commit is contained in:
parent
1fe3b42358
commit
77d6d884ea
1 changed files with 15 additions and 25 deletions
40
Dockerfile
40
Dockerfile
|
@ -3,12 +3,12 @@ FROM debian:stretch AS build
|
||||||
ARG PCRE_VERSION="8.42"
|
ARG PCRE_VERSION="8.42"
|
||||||
ARG PCRE_CHECKSUM="69acbc2fbdefb955d42a4c606dfde800c2885711d2979e356c0636efde9ec3b5"
|
ARG PCRE_CHECKSUM="69acbc2fbdefb955d42a4c606dfde800c2885711d2979e356c0636efde9ec3b5"
|
||||||
|
|
||||||
ARG OPENSSL_VERSION="1.1.1a"
|
|
||||||
ARG OPENSSL_CHECKSUM="fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41"
|
|
||||||
|
|
||||||
ARG ZLIB_VERSION="1.2.11"
|
ARG ZLIB_VERSION="1.2.11"
|
||||||
ARG ZLIB_CHECKSUM="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
|
ARG ZLIB_CHECKSUM="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
|
||||||
|
|
||||||
|
ARG OPENSSL_VERSION="1.1.1a"
|
||||||
|
ARG OPENSSL_CHECKSUM="fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41"
|
||||||
|
|
||||||
ARG NGINX_VERSION="1.15.8"
|
ARG NGINX_VERSION="1.15.8"
|
||||||
ARG NGINX_CHECKSUM="a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787"
|
ARG NGINX_CHECKSUM="a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787"
|
||||||
ARG NGINX_CONFIG="\
|
ARG NGINX_CONFIG="\
|
||||||
|
@ -25,12 +25,6 @@ ARG NGINX_CONFIG="\
|
||||||
--with-pcre=/tmp/pcre-$PCRE_VERSION \
|
--with-pcre=/tmp/pcre-$PCRE_VERSION \
|
||||||
--with-openssl=/tmp/openssl-$OPENSSL_VERSION \
|
--with-openssl=/tmp/openssl-$OPENSSL_VERSION \
|
||||||
--with-zlib=/tmp/zlib-$ZLIB_VERSION \
|
--with-zlib=/tmp/zlib-$ZLIB_VERSION \
|
||||||
--without-http_empty_gif_module \
|
|
||||||
--without-http_geo_module \
|
|
||||||
--without-http_map_module \
|
|
||||||
--without-http_referer_module \
|
|
||||||
--without-http_ssi_module \
|
|
||||||
--without-http_split_clients_module \
|
|
||||||
--with-file-aio \
|
--with-file-aio \
|
||||||
--with-http_ssl_module \
|
--with-http_ssl_module \
|
||||||
--with-http_v2_module \
|
--with-http_v2_module \
|
||||||
|
@ -39,22 +33,19 @@ ARG NGINX_CONFIG="\
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--add-module=/tmp/ngx_brotli"
|
--add-module=/tmp/ngx_brotli"
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
|
|
||||||
ADD https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.tar.gz /tmp/pcre.tar.gz
|
ADD https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.tar.gz /tmp/pcre.tar.gz
|
||||||
RUN if [ "$PCRE_CHECKSUM" != "$(sha256sum /tmp/pcre.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
|
||||||
tar xf /tmp/pcre.tar.gz
|
|
||||||
|
|
||||||
ADD https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz /tmp/openssl.tar.gz
|
ADD https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz /tmp/openssl.tar.gz
|
||||||
RUN if [ "$OPENSSL_CHECKSUM" != "$(sha256sum /tmp/openssl.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
|
||||||
tar xf /tmp/openssl.tar.gz
|
|
||||||
|
|
||||||
ADD https://zlib.net/zlib-$ZLIB_VERSION.tar.gz /tmp/zlib.tar.gz
|
ADD https://zlib.net/zlib-$ZLIB_VERSION.tar.gz /tmp/zlib.tar.gz
|
||||||
RUN if [ "$ZLIB_CHECKSUM" != "$(sha256sum /tmp/zlib.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
|
||||||
tar xf /tmp/zlib.tar.gz
|
|
||||||
|
|
||||||
ADD https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz /tmp/nginx.tar.gz
|
ADD https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz /tmp/nginx.tar.gz
|
||||||
RUN if [ "$NGINX_CHECKSUM" != "$(sha256sum /tmp/nginx.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
RUN if [ "$PCRE_CHECKSUM" != "$(sha256sum /tmp/pcre.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
||||||
|
tar xf /tmp/pcre.tar.gz && \
|
||||||
|
if [ "$ZLIB_CHECKSUM" != "$(sha256sum /tmp/zlib.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
||||||
|
tar xf /tmp/zlib.tar.gz && \
|
||||||
|
if [ "$OPENSSL_CHECKSUM" != "$(sha256sum /tmp/openssl.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
||||||
|
tar xf /tmp/openssl.tar.gz && \
|
||||||
|
if [ "$NGINX_CHECKSUM" != "$(sha256sum /tmp/nginx.tar.gz | awk '{print $1}')" ]; then exit 1; fi && \
|
||||||
tar xf /tmp/nginx.tar.gz && \
|
tar xf /tmp/nginx.tar.gz && \
|
||||||
mv /tmp/nginx-$NGINX_VERSION /tmp/nginx
|
mv /tmp/nginx-$NGINX_VERSION /tmp/nginx
|
||||||
|
|
||||||
|
@ -63,15 +54,14 @@ RUN apt update && \
|
||||||
apt install -y git gcc g++ make && \
|
apt install -y git gcc g++ make && \
|
||||||
git clone --recurse-submodules https://github.com/google/ngx_brotli.git /tmp/ngx_brotli && \
|
git clone --recurse-submodules https://github.com/google/ngx_brotli.git /tmp/ngx_brotli && \
|
||||||
./configure $NGINX_CONFIG && \
|
./configure $NGINX_CONFIG && \
|
||||||
make && \
|
make
|
||||||
make install
|
|
||||||
|
|
||||||
|
|
||||||
FROM gcr.io/distroless/base
|
FROM gcr.io/distroless/base
|
||||||
|
|
||||||
COPY --from=build /nginx /nginx
|
COPY --from=build /tmp/nginx/objs/nginx /nginx
|
||||||
COPY --from=build /tmp/nginx/html /etc/nginx/html
|
COPY --from=build /tmp/nginx/html /etc/nginx/html
|
||||||
|
|
||||||
COPY conf /etc/nginx
|
COPY conf /etc/nginx
|
||||||
|
|
||||||
CMD ["/nginx", "-g", "daemon off;"]
|
ENTRYPOINT ["/nginx", "-g", "daemon off;"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue