APT based distributions like Debian can be containerized with a tool called debootstrap. It is part of the image build process of lxc-create. It is also referenced in Docker Base Images for building an image from scratch.
When looking at the build scripts included in the package installation, repositories for the following distributions can be found in /usr/share/debootstrap/scripts:
- debian - universal operating system
- trisquel - a distribution of the GNU operating system, with the kernel GNU Linux-libre
- ubuntu - modern enterprise open source
- pardus - Turkish
- kali - open-source, Debian-based Linux distribution geared towards various information security tasks, such as Penetration Testing, Security Research, Computer Forensics and Reverse Engineering
- elxr - Enterprise-Grade Linux for Edge-to-Cloud Deployments
- pureos - fully-convergent, user friendly, secure and freedom respecting OS for your daily usage
The wiki shows a simple two liner to get the basics of the distribution in place (as root):
mkdir trixie-chroot debootstrap stable trixie-chroot http://deb.debian.org/debian/
Enter the chroot and note new root:
root@test:~# pwd /root root@test:~# chroot trixie/ root@test:/# pwd / root@test:/# exit exit root@test:~# pwd /root
After the debootstrap, create the base for docker, and give it a try:
tar -C trixie-chroot -c . | docker import - trixie docker run trixie cat /etc/debian_version docker run --rm -i -t trixie /bin/bash
Although debootstrap can be used to build an image for a version subsequent, it is generally recommended to use debootstrap from at least the desired version to ensure it has the proper updates and dependencies.
Command line to summarize the referenced repositories:
grep -h default_mirror /usr/share/debootstrap/scripts/* \ | sed 's/default_mirror//' \ | sed 's/[ \t]//g' \ | sort \ | uniq


