Skip to content

Commit

Permalink
Merge pull request #191 from gardener/cross-arch-builds
Browse files Browse the repository at this point in the history
use buildx to build docker images
  • Loading branch information
Roncossek authored Dec 12, 2024
2 parents 08e7c6f + 26831ae commit 76edf00
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ VERSION := $(shell cat "$(REPO_ROOT)/VERSION")
LD_FLAGS := "-w -X github.com/gardener/$(EXTENSION_PREFIX)-$(NAME)/pkg/version.Version=$(IMAGE_TAG)"
LEADER_ELECTION := true
IGNORE_OPERATION_ANNOTATION := true
PLATFORM ?= linux/amd64

#########################################
# Tools #
Expand Down Expand Up @@ -50,8 +51,13 @@ docker-login:

.PHONY: docker-images
docker-images:
@docker build -t $(IMAGE_PREFIX)/$(NAME):$(VERSION) -t $(IMAGE_PREFIX)/$(NAME):latest -f Dockerfile -m 6g --target $(EXTENSION_PREFIX)-$(NAME) .

@docker buildx build --platform=$(PLATFORM) \
-t $(IMAGE_PREFIX)/$(NAME):$(VERSION) \
-t $(IMAGE_PREFIX)/$(NAME):latest \
-f Dockerfile \
-m 6g \
--target $(EXTENSION_PREFIX)-$(NAME) \
.
#####################################################################
# Rules for verification, formatting, linting, testing and cleaning #
#####################################################################
Expand Down

0 comments on commit 76edf00

Please sign in to comment.