mirror of https://github.com/k3s-io/k3s
Use our forked qemu-static-register scripts instead of a privileged container
parent
bb9efbba25
commit
9e4fa1493d
|
@ -80,7 +80,7 @@ ifeq ($(ARCH),amd64)
|
|||
else
|
||||
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
|
||||
# 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
|
||||
sudo ../../third_party/multiarch/qemu-user-static/register/register.sh --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)
|
||||
# Ensure we don't get surprised by umask settings
|
||||
chmod 0755 $(TEMP_DIR)/qemu-$(QEMUARCH)-static
|
||||
|
|
|
@ -74,7 +74,7 @@ endif
|
|||
|
||||
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
|
||||
sudo ../../third_party/multiarch/qemu-user-static/register/register.sh --reset
|
||||
endif
|
||||
docker build --pull -t $(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR)
|
||||
rm -rf $(TEMP_DIR)
|
||||
|
|
|
@ -32,7 +32,7 @@ build:
|
|||
|
||||
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
|
||||
sudo ../../third_party/multiarch/qemu-user-static/register/register.sh --reset
|
||||
endif
|
||||
|
||||
docker build --pull -t $(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR)
|
||||
|
|
|
@ -83,7 +83,8 @@ build() {
|
|||
else
|
||||
${SED} -i "s|QEMUARCH|${QEMUARCHS[$arch]}|g" Dockerfile
|
||||
# Register qemu-*-static for all supported processors except the current one
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
echo "Registering qemu-*-static binaries in the kernel"
|
||||
sudo "${KUBE_ROOT}/third_party/multiarch/qemu-user-static/register/register.sh" --reset
|
||||
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/${QEMUVERSION}/x86_64_qemu-${QEMUARCHS[$arch]}-static.tar.gz | tar -xz -C ${temp_dir}
|
||||
# Ensure we don't get surprised by umask settings
|
||||
chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static"
|
||||
|
|
Loading…
Reference in New Issue