|
|
@@ -1,10 +1,8 @@
|
|
|
# Stage 1: Install dependencies (isolated layout, same as local dev)
|
|
|
FROM node:22-bookworm AS deps
|
|
|
|
|
|
-# 使用阿里云镜像源。
|
|
|
-# 注意: Kaniko 构建时挂了 HTTP/HTTPS 代理, 该代理只放行 HTTPS(CONNECT 隧道),
|
|
|
-# 拒绝转发明文 HTTP(会返回 403)。所以 apt 源必须用 https://, 不能用 http://。
|
|
|
-RUN sed -i 's|http://deb.debian.org|https://mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources
|
|
|
+# 使用阿里云镜像源
|
|
|
+# RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources
|
|
|
|
|
|
RUN corepack enable && corepack prepare pnpm@10.24.0 --activate
|
|
|
|
|
|
@@ -37,8 +35,7 @@ RUN pnpm build
|
|
|
# Stage 3: Runtime — fresh prod install with hoisted layout
|
|
|
FROM node:22-bookworm-slim AS runtime
|
|
|
|
|
|
-# 同上: apt 源用 https, 走代理 CONNECT 隧道, 避免明文 HTTP 被 403。
|
|
|
-RUN sed -i 's|http://deb.debian.org|https://mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources
|
|
|
+# RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources
|
|
|
|
|
|
RUN corepack enable && corepack prepare pnpm@10.24.0 --activate
|
|
|
|