2
0

Dockerfile.cross 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. FROM alpine:latest
  2. ARG version=dev
  3. ARG commit=HEAD
  4. LABEL org.opencontainers.image.description="Cross-cloud cost allocation models for Kubernetes workloads"
  5. LABEL org.opencontainers.image.documentation=https://opencost.io/docs/
  6. LABEL org.opencontainers.image.licenses=Apache-2.0
  7. LABEL org.opencontainers.image.source=https://github.com/opencost/opencost
  8. LABEL org.opencontainers.image.title=kubecost-cost-model
  9. LABEL org.opencontainers.image.url=https://opencost.io
  10. # The prebuilt binary path. This Dockerfile assumes the binary will be built
  11. # outside of Docker.
  12. ARG binarypath
  13. RUN apk add --update --no-cache ca-certificates
  14. ADD --chmod=400 ./THIRD_PARTY_LICENSES.txt /THIRD_PARTY_LICENSES.txt
  15. ADD --chmod=500 ./configs/default.json /models/default.json
  16. ADD --chmod=500 ./configs/azure.json /models/azure.json
  17. ADD --chmod=500 ./configs/aws.json /models/aws.json
  18. ADD --chmod=500 ./configs/gcp.json /models/gcp.json
  19. ADD --chmod=500 ./configs/alibaba.json /models/alibaba.json
  20. ADD --chmod=500 ./configs/oracle.json /models/oracle.json
  21. ADD --chmod=500 ./configs/otc.json /models/otc.json
  22. RUN chown -R 1001:1001 /models
  23. COPY ${binarypath} /go/bin/app
  24. USER 1001
  25. ENTRYPOINT ["/go/bin/app"]