diff --git a/artifacts/images/agent-build.Dockerfile b/artifacts/images/agent-build.Dockerfile index a113fd81c..f7e91ae3c 100644 --- a/artifacts/images/agent-build.Dockerfile +++ b/artifacts/images/agent-build.Dockerfile @@ -25,7 +25,7 @@ ARG ARCH RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -mod=vendor -v -a -ldflags '-extldflags "-static"' -o proxy-agent sigs.k8s.io/apiserver-network-proxy/cmd/agent # Copy the loader into a thin image -FROM gcr.io/distroless/static-debian11 +FROM gcr.io/distroless/static-debian11:nonroot WORKDIR / COPY --from=builder /go/src/sigs.k8s.io/apiserver-network-proxy/proxy-agent . ENTRYPOINT ["/proxy-agent"] diff --git a/artifacts/images/server-build.Dockerfile b/artifacts/images/server-build.Dockerfile index fe24bde21..130b7112b 100644 --- a/artifacts/images/server-build.Dockerfile +++ b/artifacts/images/server-build.Dockerfile @@ -24,7 +24,7 @@ ARG ARCH RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -mod=vendor -v -a -ldflags '-extldflags "-static"' -o proxy-server sigs.k8s.io/apiserver-network-proxy/cmd/server # Copy the loader into a thin image -FROM gcr.io/distroless/static-debian11 +FROM gcr.io/distroless/static-debian11:nonroot WORKDIR / COPY --from=builder /go/src/sigs.k8s.io/apiserver-network-proxy/proxy-server . ENTRYPOINT ["/proxy-server"]