[feature] enable building ARM image on x86

This commit is contained in:
Klesh Wong 2020-10-10 14:50:14 +08:00
parent a9c07a3d87
commit 2b642594c6

20
apps/docker-arm.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $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