# 基础镜像使用nginx FROM nginx:1.21.1 # 作者 MAINTAINER wei.fu # 将dist文件夹中的内容复制到容器中 `/usr/share/nginx/html/` 这个目录下 COPY ../../raising-vue-pro/dist/ /usr/share/nginx/html/ # 将自定义配置文件nginx.conf复制到容器中 `/etc/nginx/` 这个目录下 COPY ../../raising-vue-pro/nginx/default.conf /etc/nginx/conf.d/default.conf # 对外暴露的端口 EXPOSE 80 # 运行nginx容器 CMD ["nginx", "-g", "daemon off;"]