# 使用 nginx 作为基础镜像 FROM nginx:alpine # 复制 dist 目录的内容到 nginx 的默认网站目录 COPY dist /usr/share/nginx/html # 复制自定义 nginx 配置文件 COPY nginx.conf /etc/nginx/conf.d/default.conf # 暴露 80 端口 EXPOSE 80 # 启动 nginx CMD ["nginx", "-g", "daemon off;"]