Debian-Image für Docker

Workdir

mkdir -p Debian/jessie
cd Debian/jessie
sudo apt-get install debootstrap fakeroot
sudo debootstrap --variant minbase jessie ./jessie-chroot
sudo chroot ./jessie-chroot apt-get clean
cd jessie-chroot/ && { sudo tar czf ../jessie-minbase-chroot.tgz . ; cd -; }
sudo rm -r jessie-chroot/
vi Dockerfile

Dockerfile

FROM scratch

MAINTAINER Michael Mende <debian-in-docker@failover.de>

# untar debootstrapped minbase
ADD jessie-minbase-chroot.tgz /

# update OS
RUN \
    apt-get update -y && \
      apt-get upgrade -y && \
      apt-get autoremove -y && \
      apt-get clean

# remove non-english manpages (40/200MB)
RUN rm -rf /usr/share/man/?? /usr/share/man/??_* /usr/share/man/??.*

# remove apt-lists
RUN find /var/lib/apt/lists -type f -delete

# remove changelog files
RUN find /usr/share/doc/* -name "*changelog*" -delete

# remove non-english locales
RUN rm -r $(find /usr/share/locale/* -prune \! -path "*/en*" -type d )

CMD ["/bin/sh"]