Do not run qemu static register automatically

This commit is contained in:
Manuel de Brito Fontes 2018-05-26 12:56:08 -04:00 committed by Manuel Alejandro de Brito Fontes
parent 333f37e554
commit 8a0ed4f787
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
2 changed files with 10 additions and 4 deletions

View file

@ -115,8 +115,6 @@ ifeq ($(ARCH),amd64)
$(SED_I) "/CROSS_BUILD_/d" $(DOCKERFILE)
else
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
$(DOCKER) run --rm --privileged multiarch/qemu-user-static:register --reset
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)/rootfs
$(SED_I) "s/CROSS_BUILD_//g" $(DOCKERFILE)
endif
@ -128,6 +126,11 @@ ifeq ($(ARCH), amd64)
$(DOCKER) tag $(MULTI_ARCH_IMG):$(TAG) $(IMAGE):$(TAG)
endif
.PHONY: register-qemu
register-qemu:
# Register /usr/bin/qemu-ARCH-static as the handler for binaries in multiple platforms
$(DOCKER) run --rm --privileged multiarch/qemu-user-static:register --reset
.PHONY: push
push: .push-$(ARCH)

View file

@ -76,8 +76,6 @@ ifeq ($(ARCH),amd64)
cd $(TEMP_DIR) && $(SED_I) "/CROSS_BUILD_/d" Dockerfile
else
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
$(DOCKER) run --rm --privileged multiarch/qemu-user-static:register --reset
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)
cd $(TEMP_DIR) && $(SED_I) "s/CROSS_BUILD_//g" Dockerfile
endif
@ -89,6 +87,11 @@ ifeq ($(ARCH), amd64)
$(DOCKER) tag $(MULTI_ARCH_IMG):$(TAG) $(IMAGE):$(TAG)
endif
.PHONY: register-qemu
register-qemu:
# Register /usr/bin/qemu-ARCH-static as the handler for binaries in multiple platforms
$(DOCKER) run --rm --privileged multiarch/qemu-user-static:register --reset
push: .push-$(ARCH)
.push-$(ARCH): .container-$(ARCH)
$(DOCKER) push $(MULTI_ARCH_IMG):$(TAG)