Skip to content

Commit 9fff5eb

Browse files
committed
Nginx to 1.27.4, NJS to 0.8.10, and switching to use the quictls repo as the old one is now archived
1 parent bbac53d commit 9fff5eb

File tree

1 file changed

+103
-103
lines changed

1 file changed

+103
-103
lines changed

Dockerfile

Lines changed: 103 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# https://github.com/nginx/nginx/blob/master/src/core/nginx.h
2-
ARG NGINX_VERSION=1.27.3
2+
ARG NGINX_VERSION=1.27.4
33

44
# https://github.com/google/ngx_brotli
55
ARG NGX_BROTLI_COMMIT=6e975bcb015f62e1f303054897783355e2a877dc
66

7-
# https://github.com/quictls/openssl
8-
ARG QUICTLS_BRANCH=openssl-3.3.0+quic
7+
# https://github.com/quictls/quictls
8+
ARG QUICTLS_TAG=openssl-3.3.0
99

1010
# https://github.com/nginx/njs
11-
ARG NJS_VERSION=0.8.6
11+
ARG NJS_VERSION=0.8.10
1212

1313
# https://github.com/openresty/headers-more-nginx-module#installation
1414
# we want to have https://github.com/openresty/headers-more-nginx-module/commit/e536bc595d8b490dbc9cf5999ec48fca3f488632
@@ -19,59 +19,59 @@ ARG GEOIP2_VERSION=3.4
1919

2020
# https://nginx.org/en/docs/http/ngx_http_v3_module.html
2121
ARG CONFIG="\
22-
--build=quic-$NGINX_COMMIT-quictls-$QUICTLS_BRANCH \
23-
--prefix=/etc/nginx \
24-
--sbin-path=/usr/sbin/nginx \
25-
--modules-path=/usr/lib/nginx/modules \
26-
--conf-path=/etc/nginx/nginx.conf \
27-
--error-log-path=/var/log/nginx/error.log \
28-
--http-log-path=/var/log/nginx/access.log \
29-
--pid-path=/var/run/nginx.pid \
30-
--lock-path=/var/run/nginx.lock \
31-
--http-client-body-temp-path=/var/cache/nginx/client_temp \
32-
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
33-
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
34-
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
35-
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
36-
--user=nginx \
37-
--group=nginx \
38-
--with-http_ssl_module \
39-
--with-http_realip_module \
40-
--with-http_addition_module \
41-
--with-http_sub_module \
42-
--with-http_dav_module \
43-
--with-http_flv_module \
44-
--with-http_mp4_module \
45-
--with-http_gunzip_module \
46-
--with-http_gzip_static_module \
47-
--with-http_random_index_module \
48-
--with-http_secure_link_module \
49-
--with-http_stub_status_module \
50-
--with-http_auth_request_module \
51-
--with-http_xslt_module=dynamic \
52-
--with-http_image_filter_module=dynamic \
53-
--with-http_geoip_module=dynamic \
54-
--with-http_perl_module=dynamic \
55-
--with-threads \
56-
--with-stream \
57-
--with-stream_ssl_module \
58-
--with-stream_ssl_preread_module \
59-
--with-stream_realip_module \
60-
--with-stream_geoip_module=dynamic \
61-
--with-http_slice_module \
62-
--with-mail \
63-
--with-mail_ssl_module \
64-
--with-compat \
65-
--with-file-aio \
66-
--with-http_v2_module \
67-
--with-http_v3_module \
68-
--add-module=/usr/src/ngx_brotli \
69-
--add-module=/usr/src/headers-more-nginx-module-$HEADERS_MORE_VERSION \
70-
--add-module=/usr/src/njs/nginx \
71-
--add-dynamic-module=/usr/src/ngx_http_geoip2_module \
22+
--build=quic-$NGINX_COMMIT-quictls-$QUICTLS_TAG \
23+
--prefix=/etc/nginx \
24+
--sbin-path=/usr/sbin/nginx \
25+
--modules-path=/usr/lib/nginx/modules \
26+
--conf-path=/etc/nginx/nginx.conf \
27+
--error-log-path=/var/log/nginx/error.log \
28+
--http-log-path=/var/log/nginx/access.log \
29+
--pid-path=/var/run/nginx.pid \
30+
--lock-path=/var/run/nginx.lock \
31+
--http-client-body-temp-path=/var/cache/nginx/client_temp \
32+
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
33+
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
34+
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
35+
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
36+
--user=nginx \
37+
--group=nginx \
38+
--with-http_ssl_module \
39+
--with-http_realip_module \
40+
--with-http_addition_module \
41+
--with-http_sub_module \
42+
--with-http_dav_module \
43+
--with-http_flv_module \
44+
--with-http_mp4_module \
45+
--with-http_gunzip_module \
46+
--with-http_gzip_static_module \
47+
--with-http_random_index_module \
48+
--with-http_secure_link_module \
49+
--with-http_stub_status_module \
50+
--with-http_auth_request_module \
51+
--with-http_xslt_module=dynamic \
52+
--with-http_image_filter_module=dynamic \
53+
--with-http_geoip_module=dynamic \
54+
--with-http_perl_module=dynamic \
55+
--with-threads \
56+
--with-stream \
57+
--with-stream_ssl_module \
58+
--with-stream_ssl_preread_module \
59+
--with-stream_realip_module \
60+
--with-stream_geoip_module=dynamic \
61+
--with-http_slice_module \
62+
--with-mail \
63+
--with-mail_ssl_module \
64+
--with-compat \
65+
--with-file-aio \
66+
--with-http_v2_module \
67+
--with-http_v3_module \
68+
--add-module=/usr/src/ngx_brotli \
69+
--add-module=/usr/src/headers-more-nginx-module-$HEADERS_MORE_VERSION \
70+
--add-module=/usr/src/njs/nginx \
71+
--add-dynamic-module=/usr/src/ngx_http_geoip2_module \
7272
"
7373

74-
FROM alpine:3.20 AS base
74+
FROM alpine:3.21 AS base
7575

7676
ARG NGINX_VERSION
7777
ARG NGINX_COMMIT
@@ -83,32 +83,32 @@ ARG CONFIG
8383

8484
RUN \
8585
apk add --no-cache --virtual .build-deps \
86-
gcc \
87-
libc-dev \
88-
make \
89-
musl-dev \
90-
go \
91-
ninja \
92-
openssl-dev \
93-
pcre-dev \
94-
zlib-dev \
95-
linux-headers \
96-
gnupg \
97-
libxslt-dev \
98-
gd-dev \
99-
geoip-dev \
100-
perl-dev \
86+
gcc \
87+
libc-dev \
88+
make \
89+
musl-dev \
90+
go \
91+
ninja \
92+
openssl-dev \
93+
pcre-dev \
94+
zlib-dev \
95+
linux-headers \
96+
gnupg \
97+
libxslt-dev \
98+
gd-dev \
99+
geoip-dev \
100+
perl-dev \
101101
&& apk add --no-cache --virtual .brotli-build-deps \
102-
autoconf \
103-
libtool \
104-
automake \
105-
git \
106-
g++ \
107-
cmake \
102+
autoconf \
103+
libtool \
104+
automake \
105+
git \
106+
g++ \
107+
cmake \
108108
&& apk add --no-cache --virtual .geoip2-build-deps \
109-
libmaxminddb-dev \
109+
libmaxminddb-dev \
110110
&& apk add --no-cache --virtual .njs-build-deps \
111-
readline-dev
111+
readline-dev
112112

113113
WORKDIR /usr/src/
114114

@@ -128,36 +128,36 @@ RUN \
128128

129129
# hadolint ignore=SC2086
130130
RUN \
131-
echo "Cloning QuicTLS ..." \
132-
&& cd /usr/src \
133-
&& git clone https://github.com/quictls/openssl.git \
134-
&& cd openssl \
135-
&& git checkout $QUICTLS_BRANCH
131+
echo "Cloning QuicTLS ..." \
132+
&& cd /usr/src \
133+
&& git clone https://github.com/quictls/quictls.git openssl \
134+
&& cd openssl \
135+
&& git checkout $QUICTLS_TAG
136136

137137
RUN \
138-
echo "Downloading headers-more-nginx-module ..." \
139-
&& cd /usr/src \
140-
&& wget -q https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v${HEADERS_MORE_VERSION}.tar.gz -O headers-more-nginx-module.tar.gz \
141-
&& tar -xf headers-more-nginx-module.tar.gz
138+
echo "Downloading headers-more-nginx-module ..." \
139+
&& cd /usr/src \
140+
&& wget -q https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v${HEADERS_MORE_VERSION}.tar.gz -O headers-more-nginx-module.tar.gz \
141+
&& tar -xf headers-more-nginx-module.tar.gz
142142

143143
RUN \
144-
echo "Downloading ngx_http_geoip2_module ..." \
145-
&& git clone --depth 1 --branch ${GEOIP2_VERSION} https://github.com/leev/ngx_http_geoip2_module /usr/src/ngx_http_geoip2_module
144+
echo "Downloading ngx_http_geoip2_module ..." \
145+
&& git clone --depth 1 --branch ${GEOIP2_VERSION} https://github.com/leev/ngx_http_geoip2_module /usr/src/ngx_http_geoip2_module
146146

147147
RUN \
148-
echo "Cloning and configuring njs ..." \
149-
&& git clone --depth 1 --branch ${NJS_VERSION} https://github.com/nginx/njs.git /usr/src/njs \
150-
&& cd /usr/src/njs \
151-
&& ./configure \
152-
&& make njs \
153-
&& mv /usr/src/njs/build/njs /usr/sbin/njs \
154-
&& echo "njs v$(njs -v)"
148+
echo "Cloning and configuring njs ..." \
149+
&& git clone --depth 1 --branch ${NJS_VERSION} https://github.com/nginx/njs.git /usr/src/njs \
150+
&& cd /usr/src/njs \
151+
&& ./configure \
152+
&& make njs \
153+
&& mv /usr/src/njs/build/njs /usr/sbin/njs \
154+
&& echo "njs v$(njs -v)"
155155

156156
RUN \
157-
echo "Building nginx ..." \
157+
echo "Building nginx ..." \
158158
&& cd /usr/src/nginx-$NGINX_VERSION \
159159
&& ./auto/configure $CONFIG \
160-
--with-openssl="../openssl" \
160+
--with-openssl="../openssl" \
161161
&& make -j"$(getconf _NPROCESSORS_ONLN)"
162162

163163
RUN \
@@ -179,12 +179,12 @@ RUN \
179179
&& apk add --no-cache --virtual .gettext gettext \
180180
\
181181
&& scanelf --needed --nobanner /usr/sbin/nginx /usr/sbin/njs /usr/lib/nginx/modules/*.so /usr/bin/envsubst \
182-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
183-
| sort -u \
184-
| xargs -r apk info --installed \
185-
| sort -u > /tmp/runDeps.txt
182+
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
183+
| sort -u \
184+
| xargs -r apk info --installed \
185+
| sort -u > /tmp/runDeps.txt
186186

187-
FROM alpine:3.20
187+
FROM alpine:3.21
188188
ARG NGINX_VERSION
189189
ARG NGINX_COMMIT
190190

0 commit comments

Comments
 (0)