You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
450 B
Docker
21 lines
450 B
Docker
5 months ago
|
# 使用官方 Node.js 镜像作为基础镜像
|
||
|
FROM m.daocloud.io/docker.io/library/node:20
|
||
|
|
||
|
# 设置工作目录
|
||
|
WORKDIR /app
|
||
|
|
||
4 months ago
|
# 复制打包产物到工作目录
|
||
|
COPY ./packages/backend/dist /app
|
||
|
|
||
5 months ago
|
# 复制 package.json 和 package-lock.json
|
||
4 months ago
|
COPY ./packages/backend/package*.json ./
|
||
5 months ago
|
|
||
|
# 安装依赖
|
||
|
RUN npm install --registry=https://registry.npmmirror.com
|
||
|
|
||
|
# 暴露应用运行的端口
|
||
|
EXPOSE 3000
|
||
|
|
||
|
# 启动应用
|
||
4 months ago
|
CMD ["node", "server/index.js"]
|