deploy: improve container push rules

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>
This commit is contained in:
Damien Grisonnet 2021-06-30 15:01:34 +02:00
parent 70418fdbf8
commit 046b970edb
3 changed files with 50 additions and 46 deletions

View file

@ -1,7 +1,6 @@
ARG BASEIMAGE
ARG GOIMAGE
ARG GO_VERSION
FROM ${GOIMAGE} as build
FROM golang:${GO_VERSION} as build
WORKDIR /go/src/sigs.k8s.io/prometheus-adapter
COPY go.mod .
@ -15,7 +14,7 @@ COPY Makefile Makefile
ARG ARCH
RUN make prometheus-adapter
FROM ${BASEIMAGE}
FROM gcr.io/distroless/static:latest
COPY --from=build /go/src/sigs.k8s.io/prometheus-adapter/adapter /
USER 65534