fix: 修改dockerfile文件
This commit is contained in:
parent
1aed3a8490
commit
7b2b99daea
13
Dockerfile
13
Dockerfile
@ -1,20 +1,11 @@
|
||||
# 使用官方Node.js镜像作为基础镜像
|
||||
FROM node:18-alpine
|
||||
FROM node:18-bullseye-slim
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制package.json和package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# 安装依赖
|
||||
RUN npm install
|
||||
|
||||
# 复制项目文件
|
||||
COPY . .
|
||||
|
||||
# 暴露服务端口
|
||||
EXPOSE 3000
|
||||
|
||||
# 启动服务
|
||||
CMD ["node", "index.js"]
|
||||
CMD ["npm", "start"]
|
||||
|
Loading…
Reference in New Issue
Block a user