Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile: v1.25.3 #134

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 20 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# https://hg.nginx.org/nginx/file/tip/src/core/nginx.h
ARG NGINX_VERSION=1.25.2
ARG NGINX_VERSION=1.25.3

# https://hg.nginx.org/nginx
ARG NGINX_COMMIT=44536076405c
ARG NGINX_COMMIT=25a2efd97a3e

# https://github.com/google/ngx_brotli
ARG NGX_BROTLI_COMMIT=63ca02abdcf79c9e788d2eedcc388d2335902e52

# https://github.com/google/boringssl
ARG BORINGSSL_COMMIT=e1b8685770d0e82e5a4a3c5d24ad1602e05f2e83
#ARG BORINGSSL_COMMIT=fae0964b3d44e94ca2a2d21f86e61dabe683d130

# http://hg.nginx.org/njs / v0.8.1
ARG NJS_COMMIT=a387eed79b90
Expand All @@ -26,7 +26,7 @@ ARG NGINX_GROUP_GID=101

# https://nginx.org/en/docs/http/ngx_http_v3_module.html
ARG CONFIG="\
--build=quic-$NGINX_COMMIT-boringssl-$BORINGSSL_COMMIT \
--build=quic-$NGINX_COMMIT \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib/nginx/modules \
Expand Down Expand Up @@ -78,7 +78,7 @@ ARG CONFIG="\
--add-dynamic-module=/usr/src/ngx_http_geoip2_module \
"

FROM alpine:3.17 AS base
FROM alpine:3.19 AS base

ARG NGINX_VERSION
ARG NGINX_COMMIT
Expand Down Expand Up @@ -137,20 +137,20 @@ RUN \
&& git submodule update --init --depth 1

# hadolint ignore=SC2086
RUN \
echo "Cloning boringssl ..." \
&& cd /usr/src \
&& git clone https://github.com/google/boringssl \
&& cd boringssl \
&& git checkout $BORINGSSL_COMMIT

RUN \
echo "Building boringssl ..." \
&& cd /usr/src/boringssl \
&& mkdir build \
&& cd build \
&& cmake -GNinja .. \
&& ninja
#RUN \
# echo "Cloning boringssl ..." \
# && cd /usr/src \
# && git clone https://github.com/google/boringssl \
# && cd boringssl \
# && git checkout $BORINGSSL_COMMIT

#RUN \
# echo "Building boringssl ..." \
# && cd /usr/src/boringssl \
# && mkdir build \
# && cd build \
# && cmake -GNinja .. \
# && ninja

RUN \
echo "Downloading headers-more-nginx-module ..." \
Expand All @@ -177,9 +177,6 @@ RUN \
&& mkdir -p /var/run/nginx/ \
&& cd /usr/src/nginx-$NGINX_VERSION \
&& ./auto/configure $CONFIG \
--with-cc-opt="-I../boringssl/include" \
--with-ld-opt="-L../boringssl/build/ssl \
-L../boringssl/build/crypto" \
&& make -j"$(getconf _NPROCESSORS_ONLN)"

RUN \
Expand All @@ -206,7 +203,7 @@ RUN \
| xargs -r apk info --installed \
| sort -u > /tmp/runDeps.txt

FROM alpine:3.17
FROM alpine:3.19
ARG NGINX_VERSION
ARG NGINX_COMMIT
ARG NGINX_USER_UID
Expand Down
12 changes: 5 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ docker pull ghcr.io/macbre/nginx-http3:latest

```
$ docker run -it macbre/nginx-http3 nginx -V
nginx version: nginx/1.25.2 (quic-44536076405c-boringssl-e1b8685770d0e82e5a4a3c5d24ad1602e05f2e83)
built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4)
built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)
nginx version: nginx/1.25.3 (quic-25a2efd97a3e)
built by gcc 13.2.1 20231014 (Alpine 13.2.1_git20231014)
built with OpenSSL 3.1.4 24 Oct 2023
TLS SNI support enabled
configure arguments:
--build=quic-44536076405c-boringssl-e1b8685770d0e82e5a4a3c5d24ad1602e05f2e83
--build=quic-25a2efd97a3e
--prefix=/etc/nginx
--sbin-path=/usr/sbin/nginx
--modules-path=/usr/lib/nginx/modules
Expand Down Expand Up @@ -81,8 +81,6 @@ configure arguments:
--add-module=/usr/src/headers-more-nginx-module-0.34
--add-module=/usr/src/njs/nginx
--add-dynamic-module=/usr/src/ngx_http_geoip2_module
--with-cc-opt=-I../boringssl/include
--with-ld-opt='-L../boringssl/build/ssl -L../boringssl/build/crypto'

$ docker run -it macbre/nginx-http3 njs -v
0.8.1
Expand Down Expand Up @@ -165,4 +163,4 @@ It is necessary to expose both UDP and TCP ports to be able to HTTP/3
- '443:443/udp' # use UDP for usage of HTTP/3
```

Note: both TCP and UDP HTTP/3 ports needs to be the same
Note: both TCP and UDP HTTP/3 ports needs to be the same