From 6458f346277e88522a615d7adcf9a9317ab3b4c0 Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Tue, 22 Aug 2017 12:20:38 -0700 Subject: [PATCH] Run multiarch/qemu-user-static:register before building cross-arch images --- build/debian-hyperkube-base/Makefile | 2 ++ cluster/images/hyperkube/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/build/debian-hyperkube-base/Makefile b/build/debian-hyperkube-base/Makefile index 3a63ba6ebf21..b6d518322855 100644 --- a/build/debian-hyperkube-base/Makefile +++ b/build/debian-hyperkube-base/Makefile @@ -51,6 +51,8 @@ endif mkdir -p ${TEMP_DIR}/cni-bin tar -xz -C ${TEMP_DIR}/cni-bin -f "cni-tars/${CNI_TARBALL}" + # Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel + docker run --rm --privileged multiarch/qemu-user-static:register --reset docker build --pull -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR) rm -rf $(TEMP_DIR) diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index ccb5e8701155..e17db25e15db 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -38,6 +38,8 @@ endif cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile + # Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel + docker run --rm --privileged multiarch/qemu-user-static:register --reset docker build --pull -t ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${TEMP_DIR} rm -rf "${TEMP_DIR}"