Blame docker-builder-i386/build-tgz.sh

10e43d
#!/bin/bash -x
10e43d
10e43d
set -e
10e43d
10e43d
arch=i386
10e43d
suite=wheezy
10e43d
chroot_dir="/var/chroot/$suite"
10e43d
apt_mirror="ftp://ftp.debian.org/debian/"
10e43d
docker_image="my/debian-$arch:$suite"
10e43d
10e43d
export DEBIAN_FRONTEND=noninteractive
10e43d
debootstrap --arch $arch $suite $chroot_dir $apt_mirror
10e43d
10e43d
cat <<eof> $chroot_dir/etc/apt/sources.list</eof>
10e43d
deb $apt_mirror $suite main
10e43d
deb $apt_mirror $suite-updates main
10e43d
deb http://security.debian.org/ $suite/updates main
10e43d
EOF
10e43d
10e43d
chroot $chroot_dir apt-get update
10e43d
chroot $chroot_dir apt-get upgrade -y
10e43d
chroot $chroot_dir apt-get autoclean
10e43d
chroot $chroot_dir apt-get clean
10e43d
chroot $chroot_dir apt-get autoremove
10e43d
10e43d
tar cfz debian-$suite-$arch.tar.gz -C $chroot_dir .
10e43d
rm -rf $chroot_dir