FROM nginx:alpine # 删除 nginx 默认配置 RUN rm /etc/nginx/conf.d/default.conf # 创建配置文件 COPY nginx.conf /etc/nginx/conf.d/default.conf # 将构建好的文件复制到 nginx COPY admin /usr/share/nginx/html # 暴露端口 EXPOSE 80 # 启动 nginx CMD ["nginx", "-g", "daemon off;"]