Compare commits
2 Commits
2f96ac363c
...
4314cfb2aa
Author | SHA1 | Date | |
---|---|---|---|
4314cfb2aa
|
|||
22eeb783b8
|
@@ -1,6 +1,6 @@
|
|||||||
ARG VERSION
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
ARG VERSION
|
||||||
|
ENV NGINX_VERSION=${VERSION}
|
||||||
RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
|
RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
|
||||||
&& CONFIG="\
|
&& CONFIG="\
|
||||||
--prefix=/etc/nginx \
|
--prefix=/etc/nginx \
|
||||||
@@ -85,8 +85,8 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
|
|||||||
zlib \
|
zlib \
|
||||||
zlib-dev \
|
zlib-dev \
|
||||||
mercurial \
|
mercurial \
|
||||||
&& curl -fSL https://nginx.org/download/nginx-${VERSION}.tar.gz -o nginx-${VERSION}.tar.gz \
|
&& curl -fSL https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -o nginx-${NGINX_VERSION}.tar.gz \
|
||||||
&& curl -fSL https://nginx.org/download/nginx-${VERSION}.tar.gz.asc -o nginx-${VERSION}.tar.gz.asc \
|
&& curl -fSL https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz.asc -o nginx-${NGINX_VERSION}.tar.gz.asc \
|
||||||
&& export GNUPGHOME="$(mktemp -d)" \
|
&& export GNUPGHOME="$(mktemp -d)" \
|
||||||
&& found=''; \
|
&& found=''; \
|
||||||
for server in \
|
for server in \
|
||||||
@@ -99,11 +99,11 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
|
|||||||
gpg --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$GPG_KEYS" && found=yes && break; \
|
gpg --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$GPG_KEYS" && found=yes && break; \
|
||||||
done; \
|
done; \
|
||||||
test -z "$found" && echo >&2 "error: failed to fetch GPG key $GPG_KEYS" && exit 1; \
|
test -z "$found" && echo >&2 "error: failed to fetch GPG key $GPG_KEYS" && exit 1; \
|
||||||
gpg --batch --verify nginx-${VERSION}.tar.gz.asc nginx-${VERSION}.tar.gz \
|
gpg --batch --verify nginx-${NGINX_VERSION}.tar.gz.asc nginx-${NGINX_VERSION}.tar.gz \
|
||||||
&& mkdir -p /usr/src \
|
&& mkdir -p /usr/src \
|
||||||
&& tar -zxC /usr/src -f nginx-${VERSION}.tar.gz \
|
&& tar -zxC /usr/src -f nginx-${NGINX_VERSION}.tar.gz \
|
||||||
&& rm nginx-${VERSION}.tar.gz \
|
&& rm nginx-${NGINX_VERSION}.tar.gz \
|
||||||
&& rm -rf "$GNUPGHOME" nginx-${VERSION}.tar.gz.asc \
|
&& rm -rf "$GNUPGHOME" nginx-${NGINX_VERSION}.tar.gz.asc \
|
||||||
&& git clone --depth=1 --recurse-submodules https://github.com/google/ngx_brotli /usr/src/ngx_brotli \
|
&& git clone --depth=1 --recurse-submodules https://github.com/google/ngx_brotli /usr/src/ngx_brotli \
|
||||||
&& git clone --depth=1 https://github.com/openresty/headers-more-nginx-module /usr/src/ngx_headers_more \
|
&& git clone --depth=1 https://github.com/openresty/headers-more-nginx-module /usr/src/ngx_headers_more \
|
||||||
&& hg clone http://hg.nginx.org/njs /usr/src/njs \
|
&& hg clone http://hg.nginx.org/njs /usr/src/njs \
|
||||||
@@ -115,7 +115,7 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
|
|||||||
&& cmake -B/usr/src/boringssl/build -S/usr/src/boringssl -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
&& cmake -B/usr/src/boringssl/build -S/usr/src/boringssl -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
&& make -C/usr/src/boringssl/build -j$(getconf _NPROCESSORS_ONLN) \
|
&& make -C/usr/src/boringssl/build -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
) \
|
) \
|
||||||
&& cd /usr/src/nginx-${VERSION} \
|
&& cd /usr/src/nginx-${NGINX_VERSION} \
|
||||||
&& curl -fSL https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_1.25.1%2B.patch -o dynamic_tls_records.patch \
|
&& curl -fSL https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_1.25.1%2B.patch -o dynamic_tls_records.patch \
|
||||||
&& patch -p1 < dynamic_tls_records.patch \
|
&& patch -p1 < dynamic_tls_records.patch \
|
||||||
&& ./configure $CONFIG --with-debug --with-cc-opt="-I/usr/src/boringssl/include" --with-ld-opt="-L/usr/src/boringssl/build/ssl -L/usr/src/boringssl/build/crypto" \
|
&& ./configure $CONFIG --with-debug --with-cc-opt="-I/usr/src/boringssl/include" --with-ld-opt="-L/usr/src/boringssl/build/ssl -L/usr/src/boringssl/build/crypto" \
|
||||||
@@ -143,7 +143,7 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
|
|||||||
&& ln -s ../../usr/lib/nginx/modules /etc/nginx/modules \
|
&& ln -s ../../usr/lib/nginx/modules /etc/nginx/modules \
|
||||||
&& strip /usr/sbin/nginx* \
|
&& strip /usr/sbin/nginx* \
|
||||||
&& strip /usr/lib/nginx/modules/*.so \
|
&& strip /usr/lib/nginx/modules/*.so \
|
||||||
&& rm -rf /usr/src/nginx-${VERSION} \
|
&& rm -rf /usr/src/nginx-${NGINX_VERSION} \
|
||||||
&& rm -rf /usr/src/boringssl /usr/src/ngx_* /usr/src/njs \
|
&& rm -rf /usr/src/boringssl /usr/src/ngx_* /usr/src/njs \
|
||||||
\
|
\
|
||||||
# Bring in gettext so we can get `envsubst`, then throw
|
# Bring in gettext so we can get `envsubst`, then throw
|
||||||
@@ -177,7 +177,7 @@ RUN APK_ARCH="$(cat /etc/apk/arch)"
|
|||||||
LABEL description="NGINX Docker built top of rolling release BoringSSL" \
|
LABEL description="NGINX Docker built top of rolling release BoringSSL" \
|
||||||
maintainer="Denis Denisov <denji0k@gmail.com>" \
|
maintainer="Denis Denisov <denji0k@gmail.com>" \
|
||||||
openssl="BoringSSL" \
|
openssl="BoringSSL" \
|
||||||
nginx="nginx ${VERSION}" \
|
nginx="nginx ${NGINX_VERSION}" \
|
||||||
arch="$APK_ARCH"
|
arch="$APK_ARCH"
|
||||||
|
|
||||||
EXPOSE 80 443 443/udp
|
EXPOSE 80 443 443/udp
|
||||||
|
Reference in New Issue
Block a user