From 6f8992051c8c98beea707aabea17c87506ddee6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Sun, 21 Jan 2024 17:36:26 +0100 Subject: [PATCH] Set platform during build and register binfmt interpreters in memory --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c6fed6c..c749641 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,7 @@ $(IMAGE_AMD64_DOCKERFILE): $(DOCKERFILE_TEMPLATE) '$(DOCKER)' build $(IMAGE_BUILD_OPTS) \ --tag '$(IMAGE_NAME):$(IMAGE_VERSION)-amd64' \ --tag '$(IMAGE_NAME):latest-amd64' \ + --platform linux/amd64 \ --file '$@' ./ .PHONY: build-arm64v8-image @@ -85,6 +86,7 @@ $(IMAGE_ARM64V8_DOCKERFILE): $(DOCKERFILE_TEMPLATE) '$(DOCKER)' build $(IMAGE_BUILD_OPTS) \ --tag '$(IMAGE_NAME):$(IMAGE_VERSION)-arm64v8' \ --tag '$(IMAGE_NAME):latest-arm64v8' \ + --platform linux/arm64/v8 \ --file '$@' ./ ################################################## @@ -188,7 +190,7 @@ push-cross-manifest: .PHONY: binfmt-register binfmt-register: - '$(DOCKER)' run --rm --privileged docker.io/hectorm/qemu-user-static:latest --reset + '$(DOCKER)' run --rm --privileged docker.io/hectorm/qemu-user-static:latest --reset --persistent yes ################################################## ## "version" target