Skip to content

Commit 2c88636

Browse files
authored
Merge pull request #1010 from adarshagrawal38/multi-platform
Add support for multi platform image
2 parents a3d98f2 + 7f12696 commit 2c88636

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SHELL = /usr/bin/env bash -o pipefail
2424
GIT_COMMIT_SHA ?= "$(shell git rev-parse HEAD 2>/dev/null)"
2525
GIT_TAG ?= $(shell git describe --tags --dirty --always)
2626
PLATFORMS ?= linux/amd64
27+
PUBLISH_PLATFORMS ?= linux/amd64,linux/arm64
2728
DOCKER_BUILDX_CMD ?= docker buildx
2829
IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD) build
2930
IMAGE_BUILD_EXTRA_OPTS ?=
@@ -73,6 +74,12 @@ SYNCER_IMAGE_BUILD_EXTRA_OPTS += -t $(SYNCER_IMAGE_EXTRA_TAG)
7374
BBR_IMAGE_BUILD_EXTRA_OPTS += -t $(BBR_IMAGE_EXTRA_TAG)
7475
endif
7576

77+
# Allow `make MULTI=true ...` in CI to switch to multi-arch.
78+
ifdef MULTI
79+
PLATFORMS := $(PUBLISH_PLATFORMS)
80+
endif
81+
82+
7683
# The name of the kind cluster to use for the "kind-load" target.
7784
KIND_CLUSTER ?= kind
7885

@@ -204,7 +211,7 @@ image-build: ## Build the EPP image using Docker Buildx.
204211

205212
.PHONY: image-push
206213
image-push: PUSH=--push ## Build the EPP image and push it to $IMAGE_REPO.
207-
image-push: image-build
214+
image-push: MULTI=true image-build
208215

209216
.PHONY: image-load
210217
image-load: LOAD=--load ## Build the EPP image and load it in the local Docker registry.

0 commit comments

Comments
 (0)