How to create an image with Docker

How to create an image with Docker

This page shows how to create a new image with Docker. This process consists in building a root filesystem in an extra volume of one of your servers.


When you create a server you have to select a base image. If you create your own base image, you can customize more deeply.

There are four steps to create a new image from scratch:

  • Create the root filesystem
  • Create a snapshot
  • Create an image from a snapshot
  • Create a new server with your image

Create the root filesystem

Connect to your server and clone the hello-world repository:

git clone
cd image-helloworld

It is composed of two files:

  • a Makefile, which contains variables describing your image (version, name, title, description, URL)
  • a Dockerfile, which tells how your image is built (see the Dockerfile Reference)

The image can then be built on /dev/nbd1:

make install

Refer to the Image Tools Commands documentation for the possible usages of this Makefile.

Create a snapshot

Important: Hot Snapshots are available on Virtual Cloud Instances.

At this point the extra volume contains a valid Ubuntu root filesystem. We must now transform this volume into a snapshot.

Once you server is powered off, from the servers page, select the server you created the image with.
Click the “Snapshot” button on the extra volume (in our example “volume_to_backup” - /dev/nbd1).

Volume snapshot

Create an image from snapshot

In the Control Panel, click “Volumes” in the compute section.
On this page, select the snapshot containing your rootfs and click “Create an image from snapshot”.

Create a new server with your image

Create a new server and choose your image in “My images” section.

Your server will start on your own “from scratch” image.

Discover a New Cloud Experience

Deploy SSD Cloud Servers in seconds.