fix: dockerfile修改

This commit is contained in:
huan 2024-08-09 15:08:29 +08:00
parent 5fb1c87bc0
commit 0deaced829
2 changed files with 1011 additions and 1176 deletions

View File

@ -1,11 +1,20 @@
FROM node:18-alpine # 使用官方的 Node.js 镜像作为基础镜像
FROM node:18
# 设置工作目录
WORKDIR /app WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ # 复制 package.json 和 package-lock.json如果有到工作目录
&& apk add --no-cache python3 make g++ \ COPY package*.json ./
&& npm install
# 安装依赖
RUN npm install
# 复制项目的源代码到工作目录
COPY . . COPY . .
# 暴露服务端口
EXPOSE 3000
# 启动应用程序
CMD ["npm", "start"] CMD ["npm", "start"]

2170
package-lock.json generated

File diff suppressed because it is too large Load Diff