Dockerfile 298 B

1234567891011121314151617181920
  1. FROM nginx:latest
  2. # 设置工作目录
  3. WORKDIR /app
  4. VOLUME /app/pub
  5. # 将本地的脚本复制到工作目录
  6. COPY ./src /app
  7. COPY ./nginx.conf /etc/nginx/conf.d/
  8. RUN rm /etc/nginx/conf.d/default.conf
  9. # 暴露端口
  10. EXPOSE 80
  11. # 运行 Nginx Web 服务器
  12. CMD ["nginx", "-g", "daemon off;"]