From 097bd475f601d48a82ed7aaa2f9676dd82f15d97 Mon Sep 17 00:00:00 2001 From: fight for you <40161574+wangrui19971019@users.noreply.github.com> Date: Sat, 10 Oct 2026 11:59:00 +0800 Subject: [PATCH] fix(docker): install CA certificates before the browserskill mirror swap (#4104) node:24-bookworm-slim has no trust store. Switching apt to mirrors.tencent.com first follows an HTTP to HTTPS redirect and the package install fails. Install ca-certificates from the original HTTP source before the swap, matching the runtime stage. Co-authored-by: Cursor Agent Co-authored-by: fight for you --- docker/Dockerfile.app | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/Dockerfile.app b/docker/Dockerfile.app index eb92daf7..db5f307f 100644 --- a/docker/Dockerfile.app +++ b/docker/Dockerfile.app @@ -3,7 +3,13 @@ FROM --platform=$TARGETPLATFORM node:24-bookworm-slim@sha256:ba849c60be29959425b WORKDIR /build # Use the same optional Debian mirror as the Go builder and runtime stages. ARG APK_MIRROR_ARG +# This base image has no CA certificates. Install them from the original HTTP +# Debian source before swapping in a mirror: mirrors.tencent.com redirects +# apt to HTTPS, and that handshake fails without a trust store. RUN if [ -n "$APK_MIRROR_ARG" ]; then \ + apt-get update && \ + apt-get install -y --no-install-recommends ca-certificates && \ + rm -rf /var/lib/apt/lists/* && \ sed -i "s@deb.debian.org@${APK_MIRROR_ARG}@g" /etc/apt/sources.list.d/debian.sources; \ fi && \ apt-get update && \