@@ -23,7 +23,7 @@ SHELL = /usr/bin/env bash -o pipefail
23
23
24
24
GIT_COMMIT_SHA ?= "$(shell git rev-parse HEAD 2>/dev/null) "
25
25
GIT_TAG ?= $(shell git describe --tags --dirty --always)
26
- PLATFORMS ?= linux/amd64,linux/arm64
26
+ PLATFORMS ?= linux/amd64
27
27
DOCKER_BUILDX_CMD ?= docker buildx
28
28
IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD ) build
29
29
IMAGE_BUILD_EXTRA_OPTS ?=
@@ -192,23 +192,26 @@ image-local-load: image-local-build
192
192
193
193
.PHONY : image-build
194
194
image-build : # # Build the EPP image using Docker Buildx.
195
- docker buildx inspect multiplatform > /dev/null 2>&1 || docker buildx create --name multiplatform --use
196
- docker run --privileged --rm tonistiigi/binfmt --install all
197
- docker buildx inspect --bootstrap
198
-
199
195
$(IMAGE_BUILD_CMD ) -t $(IMAGE_TAG ) \
200
196
--platform=$(PLATFORMS ) \
201
197
--build-arg BASE_IMAGE=$(BASE_IMAGE ) \
202
198
--build-arg BUILDER_IMAGE=$(BUILDER_IMAGE ) \
203
199
--build-arg COMMIT_SHA=${GIT_COMMIT_SHA} \
204
200
--build-arg BUILD_REF=${BUILD_REF} \
205
201
$(PUSH ) \
202
+ $(LOAD ) \
206
203
$(IMAGE_BUILD_EXTRA_OPTS ) ./
207
- docker pull $(IMAGE_TAG)
204
+
205
+ .PHONY : multi-platform-init
206
+ multi-platform-init : # # Set up Docker Buildx for multi-platform builds.
207
+ @docker buildx inspect multiplatform > /dev/null 2>&1 || docker buildx create --name multiplatform --use
208
+ @docker run --privileged --rm tonistiigi/binfmt --install all
209
+ @docker buildx inspect --bootstrap
208
210
209
211
.PHONY : image-push
210
212
image-push : PUSH=--push # # Build the EPP image and push it to $IMAGE_REPO.
211
- image-push : image-build
213
+ image-push : PLATFORMS=linux/amd64,linux/arm64
214
+ image-push : multi-platform-init image-build
212
215
213
216
.PHONY : image-load
214
217
image-load : LOAD=--load # # Build the EPP image and load it in the local Docker registry.
0 commit comments