This commit is contained in:
root
2026-08-14 18:56:28 +08:00
parent 1ce8efb39e
commit 9b2ea90f5c
1579 changed files with 730944 additions and 19 deletions
+15 -12
View File
@@ -1,5 +1,5 @@
# gateway:v2 - GMSSL Gateway (Nginx 1.26.2 + Tongsuo 8.4.0)
# Builds TongsuoSSL (static) and links Nginx against it to provide SM2/SM3/SM4 GMSSL support.
# gateway:v2 - GMSSL Gateway (Angie 1.11.8 + Tongsuo 8.4.0)
# Builds TongsuoSSL (static) and links Angie against it to provide SM2/SM3/SM4 GMSSL + NTLS support.
FROM ubuntu:24.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
@@ -23,20 +23,21 @@ RUN ./config --prefix=/opt/tongsuo-8.4.0 --libdir=lib64 no-shared no-zlib no-thr
&& make -j$(nproc) \
&& make install_sw
# ---- Nginx 1.26.2 (linked against Tongsuo) ----
# ---- Angie 1.11.8 (linked against Tongsuo, NTLS enabled) ----
WORKDIR /build
COPY nginx-1.26.2.tar.gz /build/
COPY no-server-header.patch /build/
RUN tar -xzf nginx-1.26.2.tar.gz \
&& patch -p1 -d nginx-1.26.2 < no-server-header.patch
WORKDIR /build/nginx-1.26.2
COPY angie-1.11.8.tar.gz /build/
COPY no-server-header-angie.patch /build/
RUN tar -xzf angie-1.11.8.tar.gz \
&& patch -p1 -d angie-Angie-1.11.8 < no-server-header-angie.patch
WORKDIR /build/angie-Angie-1.11.8
RUN ./configure \
--prefix=/usr/local/nginx \
--with-http_ssl_module \
--with-stream \
--with-stream_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-stream \
--with-stream_ssl_module \
--with-ntls \
--with-cc-opt="-I/opt/tongsuo-8.4.0/include" \
--with-ld-opt="-L/opt/tongsuo-8.4.0/lib64 -lssl -lcrypto -ldl -lpthread" \
&& make -j$(nproc) \
@@ -61,10 +62,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY --from=build /usr/local/nginx /usr/local/nginx
# Rename the executable to "gateway"
RUN mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/gateway
RUN mv /usr/local/nginx/sbin/angie /usr/local/nginx/sbin/gateway
# Built-in main nginx config (project root nginx.conf)
# Built-in main config (project root nginx.conf). Angie reads angie.conf by
# default, so install the project config under that name as well.
COPY nginx.conf /usr/local/nginx/conf/nginx.conf
RUN cp /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/angie.conf
# The config directory is mounted by the test startup script to /usr/local/nginx/conf/man.
# Pre-create a placeholder http include so the server starts when nothing is mounted.