Merge pull request #101838 from dims/use-tonistiigi/binfmt-instead-of-our-multi-arch-register-script

[agnhost and other images] Use tonistiigi/binfmt instead of our multi-arch register.sh
This commit is contained in:
Kubernetes Prow Robot 2021-05-08 21:10:47 -07:00 committed by GitHub
commit 7b2776b89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -27,8 +27,7 @@ CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
# - iproute2: includes ss used in NodePort tests
# from iperf image
# install necessary packages: iperf, bash
RUN retry () { i=0; while [ $i -lt 9 ]; do "$@" && return || sleep 30; i="${i+1}"; done; "$@"; } \
&& retry apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
&& ln -s /usr/bin/iperf /usr/local/bin/iperf \
&& ls -altrh /usr/local/bin/iperf

View File

@ -165,7 +165,7 @@ build() {
if [[ $(id -u) -ne 0 ]]; then
sudo="sudo"
fi
${sudo} "${KUBE_ROOT}/third_party/multiarch/qemu-user-static/register/register.sh" --reset -p yes
${sudo} docker run --rm --privileged tonistiigi/binfmt:latest --install all
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"