Dockerfile.cross 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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://github.com/opencost/opencost
  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 /var/www
  16. COPY default.nginx.conf.template /etc/nginx/conf.d/default.nginx.conf.template
  17. COPY nginx.conf /etc/nginx/
  18. COPY ./docker-entrypoint.sh /usr/local/bin/
  19. RUN rm -rf /etc/nginx/conf.d/default.conf
  20. RUN adduser 1001 -g 1000 -D
  21. RUN chown 1001:1000 -R /var/www
  22. RUN chown 1001:1000 -R /etc/nginx
  23. RUN chown 1001:1000 -R /usr/local/bin/docker-entrypoint.sh
  24. ENV BASE_URL=/model
  25. USER 1001
  26. ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
  27. CMD ["nginx", "-g", "daemon off;"]