From 8a0ed4f78731e8e103eb6667604c8e4ae86a99e2 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Sat, 26 May 2018 12:56:08 -0400 Subject: [PATCH] Do not run qemu static register automatically --- Makefile | 7 +++++-- images/nginx/Makefile | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f4e11e19b..6f9fb5ef9 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/images/nginx/Makefile b/images/nginx/Makefile index 6c0428c0e..191aa6384 100644 --- a/images/nginx/Makefile +++ b/images/nginx/Makefile @@ -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)