mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Improve and cleanup container push rules to prepare for the move to the official gcr.k8s.io registry. As part of the improvements, I replaced the non cross platform busybox image by gcr.io/distroless/static:latest which is platform agnostic. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
21 lines
376 B
Docker
21 lines
376 B
Docker
ARG GO_VERSION
|
|
|
|
FROM golang:${GO_VERSION} as build
|
|
|
|
WORKDIR /go/src/sigs.k8s.io/prometheus-adapter
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
|
|
COPY pkg pkg
|
|
COPY cmd cmd
|
|
COPY Makefile Makefile
|
|
|
|
ARG ARCH
|
|
RUN make prometheus-adapter
|
|
|
|
FROM gcr.io/distroless/static:latest
|
|
|
|
COPY --from=build /go/src/sigs.k8s.io/prometheus-adapter/adapter /
|
|
USER 65534
|
|
ENTRYPOINT ["/adapter"]
|