Skip to content

Commit 28ed6f1

Browse files
adarshagrawal38kfswain
authored andcommitted
Updates
1 parent 5234c25 commit 28ed6f1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,21 @@ image-build: ## Build the EPP image using Docker Buildx.
195195
ddocker buildx inspect multiplatform > /dev/null 2>&1 || docker buildx create --name multiplatform --use
196196
docker run --privileged --rm tonistiigi/binfmt --install all
197197
docker buildx inspect --bootstrap
198+
199+
@bash -ec '\
200+
PLATFORMS="$(PLATFORMS)"; \
201+
if echo "$(LOAD)" | grep -q -- "--load"; then \
202+
echo "⚠️ --load detected; forcing platform to linux/amd64"; \
203+
PLATFORMS=linux/amd64; \
204+
fi; \
198205
$(IMAGE_BUILD_CMD) -t $(IMAGE_TAG) \
199-
--platform=$(PLATFORMS) \
206+
--platform=$$PLATFORMS \
200207
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
201208
--build-arg BUILDER_IMAGE=$(BUILDER_IMAGE) \
202209
--build-arg COMMIT_SHA=${GIT_COMMIT_SHA} \
203210
--build-arg BUILD_REF=${BUILD_REF} \
204211
$(PUSH) \
212+
$(LOAD) \
205213
$(IMAGE_BUILD_EXTRA_OPTS) ./
206214

207215
.PHONY: image-push

0 commit comments

Comments
 (0)