File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
cmd/kubebuilder/initproject Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,16 @@ COPY cmd/ cmd/
85
85
COPY vendor/ vendor/
86
86
87
87
# Build and test the API code
88
- RUN go build -a -o controller-manager ./cmd/controller-manager/main.go
88
+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o controller-manager ./cmd/controller-manager/main.go
89
89
RUN go test ./pkg/... ./cmd/...
90
90
91
91
# Copy the controller-manager into a thin image
92
- FROM ubuntu:latest
92
+ FROM scratch
93
93
# RUN apk --no-cache add ca-certificates
94
94
WORKDIR /root/
95
95
COPY --from=builder /go/src/{{ .Repo }}/controller-manager .
96
- CMD ["./controller-manager", "--install-crds=false"]
96
+ ENTRYPOINT ["./controller-manager"]
97
+ CMD ["--install-crds=false"]
97
98
`
98
99
99
100
//var apiserverDockerfileTemplate = `# Instructions to install API using the installer
You can’t perform that action at this time.
0 commit comments