Skip to content

Commit

Permalink
use buildx to build docker images (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBatschner authored Nov 29, 2024
1 parent f2e85a9 commit 6bcbb01
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 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,7 +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 6bcbb01

Please sign in to comment.