Dockerfile.cross 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM nginx:alpine
  2. LABEL org.opencontainers.image.description="Cross-cloud cost allocation models for Kubernetes workloads"
  3. LABEL org.opencontainers.image.documentation=https://opencost.io/docs/
  4. LABEL org.opencontainers.image.licenses=Apache-2.0
  5. LABEL org.opencontainers.image.source=https://github.com/opencost/opencost
  6. LABEL org.opencontainers.image.title=opencost-ui
  7. LABEL org.opencontainers.image.url=https://opencost.io
  8. ARG version=dev
  9. ARG commit=HEAD
  10. ENV VERSION=${version}
  11. ENV HEAD=${commit}
  12. ENV API_PORT=9003
  13. ENV API_SERVER=0.0.0.0
  14. ENV UI_PORT=9090
  15. COPY ./dist /opt/ui/dist
  16. COPY THIRD_PARTY_LICENSES.txt /THIRD_PARTY_LICENSES.txt
  17. COPY default.nginx.conf.template /etc/nginx/conf.d/default.nginx.conf.template
  18. COPY nginx.conf /etc/nginx/
  19. COPY ./docker-entrypoint.sh /usr/local/bin/
  20. RUN mkdir -p /var/www
  21. RUN rm -rf /etc/nginx/conf.d/default.conf
  22. RUN adduser 1001 -g 1000 -D
  23. RUN chown 1001:1000 -R /var/www
  24. RUN chown 1001:1000 -R /etc/nginx
  25. RUN chown 1001:1000 -R /usr/local/bin/docker-entrypoint.sh
  26. ENV BASE_URL=/model
  27. USER 1001
  28. ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
  29. CMD ["nginx", "-g", "daemon off;"]