Skip to content

Commit

Permalink
make cluster-api-manager container run with a non-root user (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
tariq1890 authored and k8s-ci-robot committed Jun 4, 2019
1 parent 2ec4561 commit ee3a60b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM golang:1.12.5 as builder
ARG ARCH

# Copy in the go src
WORKDIR $GOPATH/src/sigs.k8s.io/cluster-api
WORKDIR ${GOPATH}/src/sigs.k8s.io/cluster-api
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/
Expand All @@ -30,4 +30,5 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -ldflags '-extldflags "-
FROM gcr.io/distroless/static:latest
WORKDIR /
COPY --from=builder /go/src/sigs.k8s.io/cluster-api/manager .
USER nobody
ENTRYPOINT ["/manager"]

0 comments on commit ee3a60b

Please sign in to comment.