Set platform during build and register binfmt interpreters in memory

This commit is contained in:
Héctor Molinero Fernández 2024-01-21 17:36:26 +01:00
parent 21b6e9e4a1
commit 6f8992051c

View File

@ -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