Build Debian Docker Image from Scratch








Now that we have practiced some basic operations with Docker, let’s create, import and start an image. This article covers how to build a Debian docker image from scratch and use it in docker.

We’ll be using the famous debootstrap tool which installs a Debian base system into a subdirectory of another, already installed system.

Build Wheezy

First install debootstrap

Then prepare the root directory

Finally build a Wheezy system

At this point you have a small environment which you can chroot into and modify it the way you like

You will drop to a bash shell in the newly created system, I won’t do any further changes to this system except modifying the banner

Import Docker Image

Now let’s import this new system into docker:

If the import goes well, you will see the ID of the newly imported image

First check the images list:

And start the new image

And voilĂ , you just built a new docker image, imported it, and ready to dockerize it.


  1. says


    I personally prefer wordpress as it is straight to the point for building blogs. I am not familiar with BlogEngine or B2evolution, but I use Drupal to build full featured websites.

    I am using WordPress and the theme is WinterSong Pro.