How can I make my own base image for Docker?

According to the Docker documentation, to build your own image, you must always specify a base image using the FROM instruction.

Obviously, there are lots of images to choose from in the Docker index, but what if I wanted to build my own? Is that possible?

The image base is built off Ubuntu if I understand correctly, and I want to experiment with a Debian image. Plus, I want to really understand how Docker works, and the base image is still a blackbox for me.


Edit: official documentation on creating a base image


You can take a look at how the base images are created and go from there.

You can find them here: https://github.com/dotcloud/docker/tree/master/contrib. There is mkimage-busybox.sh, mkimage-unittest.sh, mkimage-debian.sh


Quoting Solomon Hykes:

You can easily create a new container from any tarball with "docker import". For example:

debootstrap raring ./rootfs
tar -C ./rootfs -c . | docker import - flimm/mybase