Docker, a Container Solution

As software develops and matures, so has the tooling around how we interact and use our software. One of those technologies that has started to become widely adopted is the usage of Containers for deployments. A container is the idea that you want to bundle all the necessary components of your system such that it will create a consistent run-time environment wherever it is deployed.

Docker

Docker is the most widely adopted container software in the industry. With docker, you specify all of the components of your system, which may include:

- Application Code
- Libraries and Dependencies
- Frameworks and Run-times

Which get bundled into one package that is deployed to your servers.

How does Containers differ from Virtualization?

Containers and Virtualization can solve some of the same problems, such as separating the domain of your applications and utilizing physical hardware more effectively, but they are implemented differently, and therefore have different benefits and drawbacks.

Implementation

Virtualization runs on virtual machines, which work on a hardware level to run multiple instances of an operating systems on the same physical hardware. Virtualization is the most popular way to run multiple systems on the same hardware, and is a mature solution that hardware has adapted to support with technologies like Intel VT and AMD-V. Applications that you deploy will be run in a dedicated virtual machine.

Containers on the other hand run on the operating system level, by creating a dedicated mount space over the operating system level for your applications. Every time you need to add a new application to a machine, a new docker mount is created and your application is added to that operating system.

Benefits of Containers


  • Containers are more light-weight and require less resources because they do not have to carry its own operating system, which uses space and computing resources.
  • Containers sizes are smaller, again due to not having to include the operating system
  • Containers will take less time to boot/start because they don't need to wait for the system to start a new operating system.
  • It is easier to modularize your components into smaller/specialized modules that can be changed independently, which is helpful for microservices.

Drawbacks of Containers

  • VMs offer theoretically better security because of the increased isolation, as there is nothing shared between each of your applications.
  • Tooling is much more mature for virtualization, as its been around longer.
Note: Virtualization and Containers can be used as complementary to each other, such that you can have a virtual machine that can contain multiple containers.

Comments

Popular posts from this blog

Uncle Bob's Clean Architecture

C4 Model: Describing Software Architecture

Running RabbitMQ with Docker