Skip to content

Commit 0ba29f2

Browse files
authored
Update Dockerfile
1 parent 64774e3 commit 0ba29f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ WORKDIR /app
1010
# 安装必要的系统依赖(例如 CA 证书)
1111
RUN apk add --no-cache ca-certificates && update-ca-certificates
1212

13+
ENV NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca"
14+
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
15+
1316
# 阶段2:构建应用程序
1417
FROM base AS builder
1518

1619
WORKDIR /app
1720

1821
# 复制依赖文件
1922
COPY package.json yarn.lock ./
23+
RUN yarn config set cafile /etc/ssl/certs/ca-certificates.crt
2024

2125
# 配置镜像源
2226
ARG REGISTRY_LIST="https://registry.npmmirror.com/ https://registry.npmjs.org/ https://registry.yarnpkg.com/"

0 commit comments

Comments
 (0)