Dockerfile 450 B

12345678910111213141516171819202122232425262728
  1. FROM golang:1.16-alpine AS build
  2. ##
  3. ## Build
  4. ##
  5. WORKDIR /cilium-splunk
  6. COPY go.mod ./
  7. COPY go.sum ./
  8. RUN go mod download
  9. COPY ./cmd/cilium-exporter ./cmd/cilium-exporter
  10. COPY ./internal ./internal
  11. COPY ./config.yaml.example ./
  12. RUN go build -o /cilium-exporter ./cmd/cilium-exporter/main.go
  13. ##
  14. ## Deploy
  15. ##
  16. #FROM golang:1.16-alpine
  17. FROM alpine:3.14
  18. WORKDIR /
  19. COPY --from=build /cilium-exporter /cilium-exporter
  20. ENTRYPOINT ["/cilium-exporter"]