Container Management with Docker

Slashdot it! Delicious Share on Facebook Tweet! Digg!
Ian Holland, 123RF

Ian Holland, 123RF

Container Shipyard

Docker is an economical alternative to conventional virtualization. Because each Docker containers share the underlying operating system, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient.

Rarely has such a young software raised so much attention in such as short time as the Docker [1] container manager. Docker is one of the fastest growing open source developments in the history of free software. Released in March of 2013, it made it to version 1.0 in June of 2014 and was declared ready for production. In the same month, Docker was already part of Red Hat's release of RHEL 7. Further cooperative agreements exist with Canonical, openSUSE, CoreOS, VMware and others. Along with that, Docker is a member of Google's Kubernetes project [2].

The visualization associated with the name Docker sums it up: a ship/computer is loaded with containers that you can stack, transport, isolate, and protect (Figure 1). Docker containers in IT are isolated virtual environments for isolated execution of processes and applications. Docker is currently used primarily for developing, testing, and deploying applications and can isolate them along with their dependencies in containers. These applications have practically no overhead and can run nearly as fast as native applications.

Figure 1: The Docker logo says it all: The underlying computer is loaded with containers containing isolated images.

Unlike the well-known hypervisors [3] VirtualBox, VMware Workstation, HyperV, Parallels Desktop or Xen, a Docker container doesn't need its own operating system. Each container uses the basic functions of its host system and is therefore self-sufficient and isolated from other containers. Only the host's kernel needs to match that of the guest.

The Basics

The Docker use the groups (cgroups ) [4] and kernel namespace [5] technologies. The namespaces serve to isolate and protect, while cgroups ensure that the container can use the resources selectively granted to it by the host. Until version 0.8 (version 1.2 is the current one) Docker also availed itself of the functions of Linux Containers (LXC) [6], but developed its own API named Libcontainer in version 0.9 that is also available to other projects.

Currently, Docker is mainly used as a PaaS [7], but it is becoming quite suitable as a resource-friendly alternative to desktop virtualization (Figure 2). Graphical tools are being developed to handle containers, and I will present one of them, Panamax, later in this article as one of the first interfaces its kind.

Figure 2: Comparing Docker with a virtual machine. Although VMs implement a whole OS for each instance, Docker shares an OS for all instances.

The Components

The Docker system consists of three main components: a daemon, a client, and images. The daemon is responsible for orchestrating the containers; the client is what you use to control Docker with commands. The client and daemon can run on the same machine or the client can contact the daemon on a datacenter server or over the cloud. Docker images are the equivalent of virtual machines (VMs) for VirtualBox or appliances in VMware. Compared with these, Docker images are extremely space-saving, can be stacked, and can be versioned in a CVS [8].

The Docker hub is laid out as a SaaS (Software as a Service) [9] and includes the repositories that now have around 15,000 complete image recipes (Figure 3). These are different from base images, which represent a base operating system along with related images containing one or more applications. Creating your own images isn't rocket science after a bit of training, but you need to know the command language of the distribution. An example would be to create an image using WordPress, PHP, MariaDB, SSH, or Nginx.

Figure 3: The Docker hub provides thousands of images ready for use.

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content