From 7b2b99daea395f62ebf59608dd7989aae4fefa60 Mon Sep 17 00:00:00 2001 From: huan <1486343814@qq.com> Date: Mon, 12 Aug 2024 10:59:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9dockerfile=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index d59d755..8eadc5b 100644 --- a/Dockerfile +++ b/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"]