Skip to content

Commit

Permalink
Merge pull request #564 from mihivagyok/use-distroless-nonroot
Browse files Browse the repository at this point in the history
Use nonroot distroless image for agent and server
  • Loading branch information
k8s-ci-robot authored Feb 16, 2024
2 parents 125962d + dc7dc5c commit deb9efe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion artifacts/images/agent-build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion artifacts/images/server-build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit deb9efe

Please sign in to comment.