Skip to content

Commit

Permalink
makefile: add --platform flag to build images for linux/amd64
Browse files Browse the repository at this point in the history
Signed-off-by: Rewant Soni <[email protected]>
  • Loading branch information
rewantsoni committed Apr 3, 2024
1 parent b7bebdd commit 9807312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go

container-build: test-setup go-test ## Build container image with the manager.
$(IMAGE_BUILD_CMD) build -t ${IMG} .
$(IMAGE_BUILD_CMD) build --platform="linux/amd64" -t ${IMG} .

container-push: ## Push container image with the manager.
$(IMAGE_BUILD_CMD) push ${IMG}
Expand Down Expand Up @@ -134,7 +134,7 @@ bundle: manifests kustomize operator-sdk yq ## Generate bundle manifests and met

.PHONY: bundle-build
bundle-build: bundle ## Build the bundle image.
$(IMAGE_BUILD_CMD) build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
$(IMAGE_BUILD_CMD) build --platform="linux/amd64" -f bundle.Dockerfile -t $(BUNDLE_IMG) .

.PHONY: bundle-push
bundle-push: ## Push the bundle image.
Expand Down

0 comments on commit 9807312

Please sign in to comment.