From 631009f8f61c1f33f8e9f202ad9f4933e0a4a8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Thu, 10 Oct 2024 12:03:33 +0800 Subject: [PATCH 1/3] perf: use python embed --- Dockerfile | 2 +- Dockerfile-static | 39 +-------------------------------------- prepare.sh | 2 +- versions.txt | 2 +- 4 files changed, 4 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea092c4..fdc27ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM jumpserver/luna:${VERSION} AS luna FROM nginx:1.24-bullseye ARG TARGETARCH -ARG CHECK_VERSION=v1.0.3 +ARG CHECK_VERSION=v1.0.4 ARG APT_MIRROR=http://deb.debian.org ARG TOOLS=" \ diff --git a/Dockerfile-static b/Dockerfile-static index f4f1069..b001b88 100644 --- a/Dockerfile-static +++ b/Dockerfile-static @@ -1,45 +1,8 @@ -FROM python:3.11-alpine3.20 AS stage-build -ARG TARGETARCH - -ARG DEPENDENCIES=" \ - ca-certificates \ - curl \ - zip" - -RUN apk add --no-cache ${DEPENDENCIES} - -WORKDIR /opt/applets - -COPY ../requirements.txt ./requirements.txt - -ARG PIP_MIRROR=https://pypi.org/simple -RUN set -ex \ - && mkdir pip_packages build \ - && pip config set global.index-url ${PIP_MIRROR} \ - && pip download \ - --only-binary=:all: --platform win_amd64 \ - --python-version 3.11.6 --abi cp311 \ - -d pip_packages -r requirements.txt -i${PIP_MIRROR} \ - && cp requirements.txt pip_packages \ - && zip -r pip_packages.zip pip_packages \ - && mv pip_packages.zip build - -ARG CHECK_VERSION=v1.0.2 -RUN set -ex \ - && wget https://github.com/jumpserver-dev/healthcheck/releases/download/${CHECK_VERSION}/check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \ - && tar -xf check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \ - && mv check /usr/local/bin/ \ - && chown root:root /usr/local/bin/check \ - && chmod 755 /usr/local/bin/check \ - && rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz - FROM alpine:3.20 +ARG TARGETARCH WORKDIR /tmp COPY . . RUN set -ex \ && apk add --no-cache bash \ && bash ./prepare.sh - -COPY --from=stage-build /opt/applets/build /opt/download/applets -COPY --from=stage-build /usr/local/bin/check /usr/local/bin/check diff --git a/prepare.sh b/prepare.sh index 051a394..75e8538 100755 --- a/prepare.sh +++ b/prepare.sh @@ -22,7 +22,7 @@ mkdir -p ${DOWNLOAD_DIR}/applets cd ${DOWNLOAD_DIR}/applets || exit 1 wget -O chromedriver-${CHROME_DRIVER_VERSION}-win64.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_DRIVER_VERSION}/chromedriver-win64.zip wget -O chrome-${CHROME_VERSION}-win.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_VERSION}/chrome-win.zip -wget https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-amd64.exe +wget https://github.com/jumpserver-dev/Python-Embed-Win64/releases/download/${PYTHON_VERSION}/jumpserver-tinker-python-${PYTHON_VERSION}-win64.zip wget ${DOWNLOAD_URL}/public/dbeaver-ce-${DBEAVER_VERSION}-x86_64-setup.exe wget ${DOWNLOAD_URL}/public/dbeaver-patch-${DBEAVER_VERSION}-x86_64-setup.msi wget ${DOWNLOAD_URL}/public/Tinker_Installer_${TINKER_VERSION}.exe diff --git a/versions.txt b/versions.txt index b281374..141495b 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # 1. https://github.com/jumpserver/jumpserver/blob/dev/apps/jumpserver/views/other.py#L99 # 2. https://github.com/jumpserver/jumpserver/blob/dev/apps/terminal/automations/deploy_applet_host/playbook.yml#L18 PLAY_VERSION=1.1.0-1 -PYTHON_VERSION=3.11.6 +PYTHON_VERSION=3.11.10 CHROME_VERSION=118.0.5993.118 CHROME_DRIVER_VERSION=118.0.5993.70 DBEAVER_VERSION=22.3.4 From 4ff0fda97592373a4b39731d506ffd79dc93c807 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 10 Oct 2024 04:06:16 +0000 Subject: [PATCH 2/3] perf: Update web static version --- Dockerfile-ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-ee b/Dockerfile-ee index 588c848..e5b678c 100644 --- a/Dockerfile-ee +++ b/Dockerfile-ee @@ -1,5 +1,5 @@ ARG VERSION=dev -FROM jumpserver/web-static:20240822_024934 AS static +FROM jumpserver/web-static:20241010_040353 AS static FROM jumpserver/web:${VERSION}-ce COPY --from=static /opt/ /opt/ From 16fdd56b1f20736a496ae9b8d7a6e4889eebf96d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Oct 2024 02:52:36 +0000 Subject: [PATCH 3/3] perf: Update web static version --- Dockerfile-ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-ee b/Dockerfile-ee index 3e2eec2..c99dcf5 100644 --- a/Dockerfile-ee +++ b/Dockerfile-ee @@ -1,5 +1,5 @@ ARG VERSION=dev -FROM jumpserver/web-static:20241012_082502 AS static +FROM jumpserver/web-static:20241018_025026 AS static FROM jumpserver/web:${VERSION}-ce COPY --from=static /opt/ /opt/