From 09db624b0685804ac3e34892b0eded6c20156882 Mon Sep 17 00:00:00 2001 From: fengyujue Date: Mon, 2 Jun 2025 11:36:50 +0800 Subject: [PATCH] Update Dockerfile --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7a550f..bb9eb27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -# 使用阿里云镜像 -FROM registry.cn-hangzhou.aliyuncs.com/library/node:18-alpine +# 使用阿里云公共镜像 +FROM registry.cn-hangzhou.aliyuncs.com/cloud/node:18-alpine LABEL maintainer="hejiayu " WORKDIR /gitlink_help_center @@ -8,8 +8,11 @@ WORKDIR /gitlink_help_center RUN npm config set registry https://registry.npmmirror.com RUN yarn config set registry https://registry.npmmirror.com +# 复制项目文件 COPY ./ /gitlink_help_center/ +# 安装依赖并构建 RUN yarn install RUN npm run build -- --locale zh-cn + CMD ["npm", "run", "serve"] \ No newline at end of file