What is containerization?
Containerization is an OS-level virtualization which allows you to utilize your hardware/VMs better. Containers share the host OS kernel instead of carrying their own. This makes them lightweight and faster to boot. They also use less resources than VMs.
Traditionally, deploying an application means ordering a physical/virtual server, provisioning it with the right dependencies, and then installing the application on it. Such a process can take anywhere from hours to days. Containerization is meant to streamline this process by making it simpler and faster.
Let's compare traditional VMs to containers
Why should you use containers?
Using containers to package and ship applications brings several operational and financial gains,
as the infographic below illustrates:
Containers package the environment needed for an application to run. By using containers you ensure consistency between your dev/test/production environments.
This will eliminate the “works on my machine” phenomenon.
Instead of running a dedicated VM for each application you can reduce costs by running multiple containers on the same VM. Containers also improve resource utilization by using less computing resources than VMs.
Once you package your environments/applications in containers you can save them into images which can be stored in public/private registries. This allows you to manage and distribute your packaged environments/applications. Your containers also become versioned because the container setup is version-controlled.
In an agile world velocity is important and spinning containers packaging applications and dependencies can be done in seconds. This saves a lot of time that would otherwise have been spent on setting up environments and fixing problems arising from non-conformities in those environments
Although containers can run on the same host they virtualize the CPU and memory at the OS level giving you sandboxes for your applications.
Almost all types of workloads can be containerized. Whether it is a DB server, website/web application, API service, or a microservice application, it can run in a container. Containers can also run on both Linux and Windows hosts.
How do I get started with containerization?
There are several containerization solutions on the market. While Docker is most popular among them, there are alternatives like Linux Containers and rkt. You can start by identifying a small workload (application, staging environment, dev tool-chain, or a build environment) and containerize it using your preferred container engine.
If your containerized workload requires high availability and scalability then you need to use a container orchestration framework like Kubernetes, Docker Swarm or Mesos. Such frameworks will do the magic for you and ensure your containers are healthy and up all the time.
If you want to know more about containerization but don’t know where and how to start, have a look at our Cloud Services Support and our Docker training courses. We help customers in Denmark, Sweden and Norway, and have offices in Copenhagen, Odense, Aarhus, Oslo, Malmö, Stockholm and Gothenburg.