Only register qemu-user-static when necessary.

Also, don't re-download qemu-ARCH-static binaries for debian-iptables
This commit is contained in:
Jeff Grafton
2018-08-09 15:57:11 -07:00
parent 92fc7f18a2
commit 0dee9f150b
4 changed files with 6 additions and 27 deletions

View File

@@ -39,8 +39,10 @@ endif
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
ifneq ($(ARCH),amd64)
# 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
endif
docker build --pull -t ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${TEMP_DIR}
rm -rf "${TEMP_DIR}"