Commit 1595b8e6 authored by mingyard's avatar mingyard

feat:docker file change

parent 54928e6c
...@@ -17,23 +17,12 @@ COPY . . ...@@ -17,23 +17,12 @@ COPY . .
# 构建项目 # 构建项目
RUN yarn build RUN yarn build
# 使用更小的 Node.js 镜像作为运行时镜像
FROM node:20-slim as app-stage
# FROM node:20-alpine as app-stage
# # 安装 IP、CURL
# RUN apk add --no-cache iputils curl
# 设置环境变量 # 设置环境变量
ENV NODE_ENV=development ENV NODE_ENV=development
# 设置工作目录 # 设置工作目录
WORKDIR /usr/src/code WORKDIR /usr/src/code
# 创建配置目录
RUN mkdir /etc/translation-server
# 复制构建结果和依赖 # 复制构建结果和依赖
COPY --from=build-stage /code/node_modules ./node_modules COPY --from=build-stage /code/node_modules ./node_modules
COPY --from=build-stage /code/dist ./ COPY --from=build-stage /code/dist ./
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment