Skip to content

Instantly share code, notes, and snippets.

@manchoz
Last active December 20, 2016 09:41
Show Gist options
  • Save manchoz/7eaf93326d203e3bf614ec7bb8118a2b to your computer and use it in GitHub Desktop.
Save manchoz/7eaf93326d203e3bf614ec7bb8118a2b to your computer and use it in GitHub Desktop.
# Comando docker per lanciare container per ARM su GNU/Linux x86_64
# Prerequisiti: qemu-user-static + binfmt_support
$ docker run --rm -ti -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static container4armhf/armhf-alpine /bin/sh
$ docker run --rm -ti -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static resin/rpi-raspbian /bin/bash
# Per usare docker da utente (senza sudo/su)
$ sudo usermod -aG docker $(whoami)
$ newgrp docker
# Lista dei formati binari supportati da binfmt_misc
$ ls /proc/sys/fs/binfmt_misc
# Aggiungere (registrare) ARM v5/v6/v7 alla lista dei binari supportati da qemu-user-static via binfmt_misc
$ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register
# Altre info su binfmt_misc + qemu-user-static
# https://wiki.archlinux.org/index.php/Raspberry_Pi#QEMU_chroot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment