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 <cursoragent@cursor.com> Co-authored-by: fight for you <wangrui19971019@users.noreply.github.com>main
parent
6e2e5d8bb0
commit
097bd475f6
|
|
@ -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 && \
|
||||
|
|
|
|||
Loading…
Reference in New Issue