dotfiles/apps/docker-arm.sh

22 lines
488 B
Bash
Raw Normal View History

2020-11-02 04:08:18 +00:00
#!/bin/sh
2020-11-02 04:08:18 +00:00
set -e
2020-11-08 16:26:14 +00:00
DIR=$(dirname "$(readlink -f "$0")")
2020-11-02 04:08:18 +00:00
. "$DIR/../env.sh"
# let docker be able to build arm image on x86
if ! docker run --rm -t arm64v8/ubuntu uname -m; then
case "$PM" in
apt)
sudo apt-get install qemu binfmt-support qemu-user-static
;;
pacman)
# TODO
;;
esac
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
sudo docker run --rm -t arm64v8/ubuntu uname -m
fi