Skip to content

Instantly share code, notes, and snippets.



Last active Dec 9, 2015
What would you like to do?
Build scripts for docker images inaz2/debian-armel etc.
set -e
ARCHS="armel armhf arm64 powerpc s390x"
apt-get update
apt-get -y install debootstrap qemu-user-static
for arch in $ARCHS; do
qemu-debootstrap --verbose --arch=$arch --variant=buildd --include=gdb,vim-tiny,less jessie rootfs-debian-$arch
cat <<__EOF__ >rootfs-debian-$arch/etc/apt/sources.list
deb jessie main
deb jessie-updates main
deb jessie/updates main
chroot rootfs-debian-$arch apt-get update
chroot rootfs-debian-$arch apt-get -y upgrade
chroot rootfs-debian-$arch apt-get clean
tar --numeric-owner --create --directory rootfs-debian-$arch/ . | sudo docker import - inaz2/debian-$arch:jessie
docker tag inaz2/debian-$arch:jessie inaz2/debian-$arch:latest
docker tag inaz2/debian-$arch:jessie inaz2/debian-$arch:8.2
rm -rf rootfs-debian-$arch
set -e
ARCHS="armel armhf arm64 powerpc s390x"
for arch in $ARCHS; do
docker push inaz2/debian-$arch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment