fix: 修改dockerfile,更新json文件

This commit is contained in:
zh
2024-08-12 10:55:25 +08:00
parent 0deaced829
commit 1aed3a8490
4 changed files with 75 additions and 72 deletions
+6 -6
View File
@@ -1,20 +1,20 @@
# 使用官方Node.js 镜像作为基础镜像
FROM node:18
# 使用官方Node.js镜像作为基础镜像
FROM node:18-alpine
# 设置工作目录
WORKDIR /app
# 复制 package.jsonpackage-lock.json(如果有)到工作目录
# 复制package.jsonpackage-lock.json
COPY package*.json ./
# 安装依赖
RUN npm install
# 复制项目的源代码到工作目录
# 复制项目文件
COPY . .
# 暴露服务端口
EXPOSE 3000
# 启动应用程序
CMD ["npm", "start"]
# 启动服务
CMD ["node", "index.js"]