Skip to content

Commit

Permalink
Merge pull request #65 from fanzhangio/issue55
Browse files Browse the repository at this point in the history
Set ENTRYPOINT and CMD for Dockerfile.controller
  • Loading branch information
Phillip Wittrock authored Apr 10, 2018
2 parents 1ccaeea + 2806d6b commit 1b999cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/kubebuilder/initproject/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,16 @@ COPY cmd/ cmd/
COPY vendor/ vendor/
# Build and test the API code
RUN go build -a -o controller-manager ./cmd/controller-manager/main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o controller-manager ./cmd/controller-manager/main.go
RUN go test ./pkg/... ./cmd/...
# Copy the controller-manager into a thin image
FROM ubuntu:latest
FROM scratch
# RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/src/{{ .Repo }}/controller-manager .
CMD ["./controller-manager", "--install-crds=false"]
ENTRYPOINT ["./controller-manager"]
CMD ["--install-crds=false"]
`

//var apiserverDockerfileTemplate = `# Instructions to install API using the installer
Expand Down

0 comments on commit 1b999cb

Please sign in to comment.