Debian2docker is a hybrid bootable ISO which starts an amd64 Linux system based on Debian. Its main purpose is to run Docker and to allow the execution of containers using Docker.
The ISO is currently about 55 MB and is based on Debian jessie.
Building debian2docker is quite simple:
docker rm run-debian2docker
docker build -t debian2docker .
docker run -i -t --privileged --name run-debian2docker debian2docker
docker cp run-debian2docker:/debian2docker.iso .
note: the docker cp
will complain operation not permitted
- presumably as it tries to change the file's ownership to root
- Create a VM.
- Add the ISO you've built as a virtual CD/DVD image.
- Start the VM
- Wait for the system to boot and start using debian2docker.
Linux & qemu/kvm example:
$ kvm -cdrom debian2docker.iso -m 768
# wait for the system to boot and start using debian2docker
The password for the user docker is live
.
debian2docker has the following goals:
- Remain minimal - no package installation
- Offer only the minimal tooling required to run Docker and its containers.
- Make use of Debian binary packages - avoid lengthy compilation times.
- If a package is broken or has problems, it should be fixed upstream and used.
Debian was chosen because it's a large project and it can be trusted for a few reasons:
- Debian packages can be verified and Debian can be trusted.
- Debian has been around for a long time and it'll be around.
- The toolchain and the process can be simplified by using tooling provided by Debian.
- All minimal dependencies to support Docker are already in Debian.
- The system can still remain small.
- We can still disallow the installation of software in the live environment - NO package installation!
- Packages may be customized easily by rebuilding them from sources when needed.
- We can build debian2docker in a Debian container running debian2docker.
debian2docker supports the following Docker graph drivers:
- aufs
- btrfs
- devicemapper
- vfs
AUFS is used by default for partitions formatted with ext4. BTRFS will be used if the storage partition is formatted as btrfs.
Devicemapper and vfs aren't used by default, but the kernel and Docker support these two graph drivers as well.