You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
418 B

# 使用Node.js作为基础镜像
FROM node:18-alpine
# 设置工作目录
WORKDIR /app
# 设置npm镜像源为国内源加速依赖安装
RUN npm config set registry https://registry.npmmirror.com
# 复制package.json和package-lock.json
COPY package*.json ./
# 安装项目依赖
RUN npm install
# 复制应用代码
COPY . .
# 暴露端口
EXPOSE 3000
# 直接使用node启动应用
CMD ["node", "Reject.js"]