Skip to content

Commit

Permalink
New local fast builder
Browse files Browse the repository at this point in the history
  • Loading branch information
psav committed Jan 26, 2021
1 parent 669ca4d commit 71bb952
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile-local
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY bin/manager-cgo ./manager
USER nonroot:nonroot

ENTRYPOINT ["/manager"]
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ generate: controller-gen
docker-build: test
$(RUNTIME) build . -t ${IMG}

# Build the docker image
docker-build-no-test-quick:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o bin/manager-cgo main.go
$(RUNTIME) build -f Dockerfile-local . -t ${IMG}

# Build the docker image
docker-build-no-test:
$(RUNTIME) build . -t ${IMG}
Expand All @@ -111,6 +116,8 @@ docker-push-minikube:

deploy-minikube: bundle-verify docker-build-no-test docker-push-minikube deploy

deploy-minikube-quick: bundle-verify docker-build-no-test-quick docker-push-minikube deploy


# find or download controller-gen
# download controller-gen if necessary
Expand Down

0 comments on commit 71bb952

Please sign in to comment.