Permalink
Browse files

Put the manager binary into /, instead of /root/

/root/ encourages use of the root user, and / is more the pattern I've
seen for thin containers.
  • Loading branch information...
justinsb committed Nov 29, 2018
1 parent c6067b0 commit e87227a342f648a6df72cc98cafd00d0a37058ff
@@ -84,7 +84,7 @@ spec:
spec:
containers:
- command:
- /root/manager
- /manager
image: {{ .Image }}
imagePullPolicy: Always
name: manager
@@ -50,7 +50,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager {{ .Repo }}/cmd
# Copy the controller-manager into a thin image
FROM ubuntu:latest
WORKDIR /root/
WORKDIR /
COPY --from=builder /go/src/{{ .Repo }}/manager .
ENTRYPOINT ["./manager"]
ENTRYPOINT ["/manager"]
`
@@ -12,6 +12,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager sigs.k8s.io/kub
# Copy the controller-manager into a thin image
FROM ubuntu:latest
WORKDIR /root/
WORKDIR /
COPY --from=builder /go/src/sigs.k8s.io/kubebuilder/test/project/manager .
ENTRYPOINT ["./manager"]
ENTRYPOINT ["/manager"]
@@ -42,7 +42,7 @@ spec:
spec:
containers:
- command:
- /root/manager
- /manager
image: controller:latest
imagePullPolicy: Always
name: manager

0 comments on commit e87227a

Please sign in to comment.