From a7656dabebea5a5d2262dcd65bdb5eb4b62cc22d Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 5 Jun 2026 18:28:45 +0800 Subject: [PATCH] perf: update gmssl builder --- Dockerfile-ee | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Dockerfile-ee b/Dockerfile-ee index b4806124f..6ac258b5d 100644 --- a/Dockerfile-ee +++ b/Dockerfile-ee @@ -1,4 +1,27 @@ ARG VERSION=dev +FROM python:3.14-slim-trixie AS gmssl-builder +WORKDIR /app +ARG GMSSL_VERSION=3.1.1 +RUN set -ex \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ + git \ + cmake \ + make \ + gcc \ + g++ \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +RUN set -ex \ + && git clone --branch v${GMSSL_VERSION} https://github.com/guanzhi/GmSSL.git \ + && cd GmSSL \ + && mkdir build \ + && cd build \ + && cmake .. \ + && make \ + && make -j"$(nproc)" \ + && make install FROM registry.fit2cloud.com/jumpserver/xpack:${VERSION} AS build-xpack FROM jumpserver/core:${VERSION}-ce @@ -27,10 +50,6 @@ RUN set -ex \ && uv pip install -i${PIP_MIRROR} --group xpack \ && rm -rf /root/.cache/ -RUN set -ex \ - && python3 -c "import urllib.request; urllib.request.urlretrieve('https://github.com/guanzhi/GmSSL/releases/download/v${GMSSL_VERSION}/GmSSL-${GMSSL_VERSION}-Linux.sh', '/tmp/gmssl-install.sh')" \ - && chmod +x /tmp/gmssl-install.sh \ - && /tmp/gmssl-install.sh --prefix=/usr/local --skip-license \ - && echo "/usr/local/GmSSL-${GMSSL_VERSION}-Linux/lib" > /etc/ld.so.conf.d/gmssl.conf \ - && ldconfig \ - && rm -f /tmp/gmssl-install.sh \ No newline at end of file +COPY --from=gmssl-builder /usr/local/lib/libgmssl.so* /usr/local/lib/ +COPY --from=gmssl-builder /usr/local/include/gmssl /usr/local/include/gmssl +COPY --from=gmssl-builder /usr/local/bin/gmssl /usr/local/bin/gmssl