Setting Up Docker Virtualization

Docker is not a true virtualization type like KVM, Xen or even LXC - instead it is a very lightweight container system that is typically used to run server processes in an environment that includes all their dependencies. Docker images normally contain a very basic Linux distribution and the files needed to run a single server like Apache, Nginx or MySQL. For more information on how it can be used, see the Docker website at https://www.docker.com/ .

Despite these differences, Cloudmin versions 8.5 and above treat Docker in a very similar way to other VM types, but without functionality such as the ability to remotely SSH to containers, back them up, or create regular Cloudmin images. It also supports Docker-specific functionality related to the creation, management and publishing of images using the native format. One major difference between Docker and other virtualization types is that containers do not have public IP addresses - instead they are local to the host system, and individual ports are routed from the host to containers.

Setting up a Docker Host

The first step to using Docker is to setup a host system with the tools and server needed to run containers. The recommended Linux distribution for this is Ubuntu, and the process for setting up a system as a host can be found at https://docs.docker.com/engine/installation/linux/ubuntulinux/ . Other distributions and operating systems are also supported, by following the relevant instructions at https://docs.docker.com/engine/installation/ . Note that even though Docker can be run on Windows, it is not supported by Cloudmin.

After installing Docker, you should register for an account with the Docker Hub service at https://hub.docker.com/ . This can be used to share images you create with other Docker users. However, it isn't necessary to register in order to use other Cloudmin features.

Adding a Docker Host System

  1. Install Webmin on the host system, if it isn't already.
  2. Add the host system to Cloudmin at Add System -> Add physical system, if it isn't already.
  3. Go to Host Systems -> Docker Host Systems, choose the system from the Host system to add list, and click Start Adding Host
  4. Select the DNS domain to add new systems to.
  5. If you have a Docker Hub account, enter your username, password and email address in the Docker Hub account section.
  6. Click the Register button.

Docker Images

Unlike other virtualization types, Docker cannot use Cloudmin-managed images to create virtual systems. Instead, containers must be created from Docker's own native images, which are stored on host systems rather than a central Cloudmin-managed repository. Images can be downloaded from and uploaded to a central Hub, typically the publicly available service at http://hub.docker.com/ .

Before you can create a container, an image must be downloaded to the target Docker host system as follows :

  1. Login to Cloudmin, and go to Docker -> Search Docker Images
  2. Search for an image that matches your needs. For example, docker.io/ubuntu contains Ubuntu Linux but does not launch any server, while docker.io/nginx runs an Nginx webserver.
  3. Select the images you want, choose the host systems to download it, and click the Download Images To button.
  4. Go to the Create Docker Container page, and create a new container based on the image you just downloaded.

After creating a container from one of the standard images and customizing it with your own changes, you can turn it into an image to use when creating additional containers :

  1. Select the system from the left menu, and go to System Operations -> Create Docker Image
  2. Enter a name for your image, and fill out other fields as documented on the Help page for the form.
  3. Click the Create Image button. After creation completes (which can take a few minutes), the new image will be usable for creating additional containers.

Images you have downloaded or created can be managed at Docker -> Local Docker Images. This page has buttons to delete images, upload them to the Docker Hub, and replicate images to other Docker host systems. If you have multiple hosts, replication must be performed here before an image can be used - unlike other virtualization types, it will not be performed automatically by Cloudmin.

Comments

In my case, this step : Add the host system to Cloudmin at Add System -> Add physical system, if it isn't already. ...is impossible to accomplish, please, somebody explain what is wrong.

I installed Cloudmin GPL on a physical server with Centos7 on it and created a VM instance for test. What do i need to do to add a Docker Host System from this point ? Please advice.