node-service/Dockerfile

17 lines
252 B
Docker
Raw Permalink Normal View History

2024-09-02 09:36:31 +08:00
FROM node:20-alpine
# 构建参数,在Jenkinsfile中构建镜像时定义
ARG PROFILE
# 设置工作目录
WORKDIR /app
# 将dist文件夹中的内容复制出来
COPY dist/ /app/
# 暴露端口
EXPOSE 3000
# 启动应用
CMD ["node", "main.js"]