02Jun2015

SaaS: Docker as a container solution to reduce deployment costs

There are a lot of hype around containers as a new best technical approach for hosting, development, deployment and testing. Docker [https://www.docker.com] is the most popular container-based solution.

The problem

Nowadays, software developers have a wide range of programming languages, frameworks and other tools to be used to implement various solutions (static web site, web service, analytics database, background workers, queues, etc.). But wait, development is only half of the story. DevOps guy checks out the solution from the repo to deploy it on the server or just to test it on another machine. “Dependencies hell” and other pure technical issues may turn this process into very complicated quest with bunch of traps. On the other hand, there would be many target platforms for deployment (development PC or laptop, cloud hosting, domestic cluster, etc.). Each of platforms may have its own additional deployment and configuration steps. The problem is a huge number of cases (the cartesian product of two sets: development stacks and hosting platforms) both the software developer and the systems administrator have to care about.

Container is a solution

The idea is not absolutely new. In the middle of previous century the trucking industry had almost the same problem of 2 sets: different sizes and shapes of cargo and plenty of transportation approaches. Standard transport container was introduced as universal wrapper for any kind of goods. The trucking industry operates in terms of these standard containers. Software as a Service applies the same idea. Docker helps developer to pack any application with all its dependencies into container and be sure it can be runned anywhere. On the other hand, system administrator have to worry about container environment configuration only and be sure it can run any application within a container.

Features

Formally, docker provides a system to pack, ship and run any application as a lightweight, portable, self-sufficient container that runs virtually anywhere. It uses LXC or other solution based on cgroups and namespaces. But docker doesn’t depend on Linux platform directly. That’s for ability to use docker on Windows in the future. Docker is an application-centric technology. The main goal is to run application. “Dockerizing” is a duty of software developer to make an application to be run inside docker container.

Alternatives

Based on hypervisors Virtual Machines (VM) were used widely for cloud computing infrastructure. But VM starts very slow, takes much more resources. It’s impossible to run a VM in another VM. Guest OS of VM knows nothing a fact that it’s running in VM. Container doesn’t have guest OS. It works in terms of the same OS installed and runned on the system. There are a lot of other technologies similar to docker. E.g., chroot can be treated as basic dummy container. There are also LXC, BSD jails, OpenVZ, Parallels Containers, etc. But they are not so cool as docker.

Read also

Comments are closed.