docker / Dockerfile
zhang-wei-jian's picture
proxt
6ac8123
raw
history blame contribute delete
373 Bytes
# 设置基础镜像
# FROM node:18-alpine
FROM node:20-alpine3.16
# 设置工作目录
WORKDIR /app
# 复制 package.json 和 package-lock.json 文件
COPY package*.json ./
# 安装依赖
RUN npm install
# 复制源代码
COPY . .
# 暴露应用端口, 迷惑行为,只是提示项目里面启动的端口
EXPOSE 8888
# 运行应用
CMD [ "npm", "run", "dev" ]