Skip to content

Commit

Permalink
Specify the arch passed as build arg in the distroless image (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serializator authored and serathius committed Nov 16, 2021
1 parent 986822d commit e79de76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
@@ -1,5 +1,6 @@
# Update the base image in Makefile when updating golang version. This has to
# be pre-pulled in order to work on GCB.
ARG ARCH
FROM golang:1.14.2 as build

WORKDIR /go/src/sigs.k8s.io/metrics-server
Expand All @@ -17,7 +18,7 @@ ARG GIT_TAG
ARG BUILD_DATE
RUN make metrics-server

FROM gcr.io/distroless/static:latest
FROM gcr.io/distroless/static:latest-$ARCH
COPY --from=build /go/src/sigs.k8s.io/metrics-server/metrics-server /
USER 65534
ENTRYPOINT ["/metrics-server"]

0 comments on commit e79de76

Please sign in to comment.