Skip to content

Commit e2090bd

Browse files
shaneuttvMaroon
authored andcommitted
fix: basic container image builds for linux
Signed-off-by: Shane Utt <[email protected]>
1 parent 6ead312 commit e2090bd

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,4 @@ WORKDIR /
3333
COPY --from=builder /workspace/bin/epp /app/epp
3434
USER 65532:65532
3535

36-
CMD ["sleep", "infinity"]
37-
38-
36+
ENTRYPOINT ["/app/epp"]

Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ IMG ?= controller:latest
33
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
44
ENVTEST_K8S_VERSION = 1.31.0
55

6+
TARGETOS ?= linux
7+
TARGETARCH ?= amd64
8+
69
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
710
ifeq (,$(shell go env GOBIN))
811
GOBIN=$(shell go env GOPATH)/bin
@@ -474,13 +477,13 @@ buildah-build: check-builder load-version-json ## Build and push image (multi-ar
474477
fi
475478

476479
.PHONY: image-build
477-
image-build: check-container-tool load-version-json ## Build Docker image ## Build Docker image using $(CONTAINER_TOOL)
478-
@printf "\033[33;1m==== Building Docker image $(IMG) ====\033[0m\n"
480+
image-build: check-container-tool load-version-json ## Build container image using $(CONTAINER_TOOL)
481+
@printf "\033[33;1m==== Building container image $(IMG) ====\033[0m\n"
479482
$(CONTAINER_TOOL) build --build-arg TARGETOS=$(TARGETOS) --build-arg TARGETARCH=$(TARGETARCH) -t $(IMG) .
480483

481484
.PHONY: image-push
482-
image-push: check-container-tool load-version-json ## Push Docker image $(IMG) to registry
483-
@printf "\033[33;1m==== Pushing Docker image $(IMG) ====\033[0m\n"
485+
image-push: check-container-tool load-version-json ## Push container image $(IMG) to registry
486+
@printf "\033[33;1m==== Pushing container image $(IMG) ====\033[0m\n"
484487
$(CONTAINER_TOOL) push $(IMG)
485488

486489
##@ Install/Uninstall Targets

0 commit comments

Comments
 (0)