2
0

Dockerfile.debug 1.4 KB

123456789101112131415161718192021222324252627282930
  1. # This dockerfile is for development purposes only; do not use this for production deployments
  2. FROM golang:alpine
  3. # The prebuilt binary path. This Dockerfile assumes the binary will be built
  4. # outside of Docker.
  5. ARG binary_path
  6. LABEL org.opencontainers.image.description="Cross-cloud cost allocation models for Kubernetes workloads"
  7. LABEL org.opencontainers.image.documentation=https://opencost.io/docs/
  8. LABEL org.opencontainers.image.licenses=Apache-2.0
  9. LABEL org.opencontainers.image.source=https://github.com/opencost/opencost
  10. LABEL org.opencontainers.image.title=kubecost-cost-model
  11. LABEL org.opencontainers.image.url=https://opencost.io
  12. WORKDIR /app
  13. RUN apk add --update --no-cache ca-certificates
  14. RUN go install github.com/go-delve/delve/cmd/dlv@latest
  15. ADD --chmod=644 ./THIRD_PARTY_LICENSES.txt /THIRD_PARTY_LICENSES.txt
  16. ADD --chmod=644 ./configs/default.json /models/default.json
  17. ADD --chmod=644 ./configs/azure.json /models/azure.json
  18. ADD --chmod=644 ./configs/aws.json /models/aws.json
  19. ADD --chmod=644 ./configs/gcp.json /models/gcp.json
  20. ADD --chmod=644 ./configs/alibaba.json /models/alibaba.json
  21. ADD --chmod=644 ./configs/oracle.json /models/oracle.json
  22. ADD --chmod=644 ./configs/otc.json /models/otc.json
  23. COPY ${binary_path} main
  24. ENTRYPOINT ["/go/bin/dlv exec --listen=:40000 --api-version=2 --headless=true --accept-multiclient --log --continue /app/main"]
  25. EXPOSE 9003 40000