Skip to content

Instantly share code, notes, and snippets.

@Manu343726
Created September 19, 2015 18:15
Show Gist options
  • Save Manu343726/ca0ceb224ea789415387 to your computer and use it in GitHub Desktop.
Save Manu343726/ca0ceb224ea789415387 to your computer and use it in GitHub Desktop.
Running ARM docker image with QEMU on x86_64 Arch Linux host
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
# Pull an ARM image to play with. Raspbian in the example:
docker pull philipz/rpi-raspbian
# Run the image mounting qemu-arm-static
docker run -it --rm -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static philipz/rpi-raspbian bash
root@container_hash:/# uname -a
Blah blah blah Armv7
@Manu343726
Copy link
Author

For Arch users, check this dockerfile (Adds yaourt to Arch image), and this image (Arch Linux ARM docker image).

@Nadav-Ruskin
Copy link

Thanks!

@clintlombard
Copy link

clintlombard commented Oct 19, 2020

For an updated version

yay -S qemu qemu-user-static # binfmt-support is deprecated use systemd-binfmt

# register scripts
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

# test
docker run --rm -t arm64v8/ubuntu uname -m

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment