Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829
  1. FROM nginx
  2. MAINTAINER nbcioos@163.com
  3. VOLUME /tmp
  4. ENV LANG en_US.UTF-8
  5. RUN echo "server { \
  6. listen 80; \
  7. location ^~ /nbcio-boot { \
  8. proxy_pass http://nbcio-boot-system:8080/nbcio-boot/; \
  9. proxy_set_header Host nbcio-boot-system; \
  10. proxy_set_header X-Real-IP \$remote_addr; \
  11. proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
  12. } \
  13. #解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
  14. location / { \
  15. root /var/www/html/; \
  16. index index.html index.htm; \
  17. if (!-e \$request_filename) { \
  18. rewrite ^(.*)\$ /index.html?s=\$1 last; \
  19. break; \
  20. } \
  21. } \
  22. access_log /var/log/nginx/access.log ; \
  23. } " > /etc/nginx/conf.d/default.conf \
  24. && mkdir -p /var/www \
  25. && mkdir -p /var/www/html
  26. ADD dist/ /var/www/html/
  27. EXPOSE 80
  28. EXPOSE 443