Skip to content

CLOUDP-323996: Fix make multiarch image #2382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,21 @@ bundle: manifests ## Generate bundle manifests and metadata, then validate gene
operator-sdk bundle validate ./bundle

.PHONY: image
image: ## Build the operator image
image: ## Build an operator image for local development
$(MAKE) bin/linux/amd64/manager TARGET_OS=linux TARGET_ARCH=amd64 VERSION=$(VERSION)
$(MAKE) bin/linux/arm64/manager TARGET_OS=linux TARGET_ARCH=arm64 VERSION=$(VERSION)
$(CONTAINER_ENGINE) build -f fast.Dockerfile --build-arg VERSION=$(VERSION) -t $(OPERATOR_IMAGE) .
$(CONTAINER_ENGINE) push $(OPERATOR_IMAGE)

.PHONY: image-multiarch
image-multiarch: ## Build releaseable multi-architecture operator image
$(MAKE) bin/linux/amd64/manager TARGET_OS=linux TARGET_ARCH=amd64 VERSION=$(VERSION)
$(MAKE) bin/linux/arm64/manager TARGET_OS=linux TARGET_ARCH=arm64 VERSION=$(VERSION)
$(CONTAINER_ENGINE) buildx create --use --name multiarch-builder \
--driver docker-container --bootstrap || echo "reusing multiarch-builder"
$(CONTAINER_ENGINE) buildx build --platform linux/amd64,linux/arm64 --push \
-f fast.Dockerfile --build-arg VERSION=$(VERSION) -t $(OPERATOR_IMAGE) .

.PHONY: bundle-build
bundle-build: ## Build the bundle image.
$(CONTAINER_ENGINE) build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
Expand Down
4 changes: 2 additions & 2 deletions fast.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# TODO: Eventually replace main Dockerfile
FROM golang:1.24 as certs-source
FROM golang:1.24 AS certs-source
ARG GOTOOLCHAIN=auto

# Using rolling tag to stay on latest UBI 9
FROM registry.access.redhat.com/ubi9/ubi:latest as ubi-certs
FROM registry.access.redhat.com/ubi9/ubi:latest AS ubi-certs
FROM registry.access.redhat.com/ubi9/ubi-micro:latest

ARG TARGETOS
Expand Down
Loading