Last active
December 9, 2015 13:06
-
-
Save inaz2/fd697577d394a9e4e008 to your computer and use it in GitHub Desktop.
Build scripts for docker images inaz2/debian-armel etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 http://ftp.jp.debian.org/debian/ | |
cat <<__EOF__ >rootfs-debian-$arch/etc/apt/sources.list | |
deb http://httpredir.debian.org/debian jessie main | |
deb http://httpredir.debian.org/debian jessie-updates main | |
deb http://security.debian.org jessie/updates main | |
__EOF__ | |
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 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
ARCHS="armel armhf arm64 powerpc s390x" | |
for arch in $ARCHS; do | |
docker push inaz2/debian-$arch | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment