Skip to content

Commit

Permalink
(cherry-pick) Fix flaky arm64 emulator issue docker/buildx#542
Browse files Browse the repository at this point in the history
  • Loading branch information
kinarashah authored and github-actions[bot] committed Jan 10, 2025
1 parent 646e0a5 commit 98c4850
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hack/init-buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ if ! grep -q "^Driver: docker$" <<<"${current_builder}" && \
exit 0
fi

# Ensure qemu is in binfmt_misc
# Docker desktop already has these in versions recent enough to have buildx
# We only need to do this setup on linux hosts
if [ "$(uname)" == 'Linux' ]; then
# NOTE: this is pinned to a digest for a reason!
# https://github.com/docker/buildx/issues/542#issuecomment-778835576
docker run --rm --privileged tonistiigi/binfmt --uninstall qemu-aarch64 && docker run --rm --privileged tonistiigi/binfmt --install arm64
docker run --rm --privileged tonistiigi/binfmt
fi

# Ensure we use a builder that can leverage it (the default on linux will not)
docker buildx rm ingress-nginx || true
Expand Down

0 comments on commit 98c4850

Please sign in to comment.