Dockerfile 1.2 KB

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