Dockerfile.debug 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # This dockerfile is for development purposes only; do not use this for production deployments
  2. # This file exists due to changes introduced in https://github.com/opencost/opencost/pull/2502
  3. # Tilt cannot reference files that exist outside of this ./ui folder so the reference to THIRD_PARTY_LICENSES.txt is removed
  4. FROM nginx:alpine
  5. LABEL org.opencontainers.image.description="Cross-cloud cost allocation models for Kubernetes workloads"
  6. LABEL org.opencontainers.image.documentation=https://opencost.io/docs/
  7. LABEL org.opencontainers.image.licenses=Apache-2.0
  8. LABEL org.opencontainers.image.source=https://github.com/opencost/opencost
  9. LABEL org.opencontainers.image.title=opencost-ui
  10. LABEL org.opencontainers.image.url=https://opencost.io
  11. ARG version=dev
  12. ARG commit=HEAD
  13. ENV VERSION=${version}
  14. ENV HEAD=${commit}
  15. ENV API_PORT=9003
  16. ENV API_SERVER=0.0.0.0
  17. ENV UI_PORT=9090
  18. COPY ./dist /opt/ui/dist
  19. COPY default.nginx.conf.template /etc/nginx/conf.d/default.nginx.conf.template
  20. COPY nginx.conf /etc/nginx/
  21. COPY ./docker-entrypoint.sh /usr/local/bin/
  22. RUN mkdir -p /var/www
  23. RUN rm -rf /etc/nginx/conf.d/default.conf
  24. RUN adduser 1001 -g 1000 -D
  25. RUN chown 1001:1000 -R /var/www
  26. RUN chown 1001:1000 -R /etc/nginx
  27. RUN chown 1001:1000 -R /usr/local/bin/docker-entrypoint.sh
  28. ENV BASE_URL=/model
  29. USER 1001
  30. ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
  31. CMD ["nginx", "-g", "daemon off;"]