# 使用Nginx作为基础镜像 FROM nginx:alpine as builder # 将本地Nginx配置文件复制到容器中 COPY nginx.conf /etc/nginx/conf.d/default.conf # 将Vue.js应用的构建产物复制到Nginx的默认目录 COPY dist /usr/share/nginx/html # 暴露Nginx端口 EXPOSE 80 # 启动Nginx CMD ["nginx", "-g", "daemon off;"]