Containers. Well, Docker.

 Imagine containers as a shopping basket, everything you need you just put in there.

Containers are just that, but for software. They make moving software painless and more reliable. This could be from a developer’s laptop to production, or from a physical machine to the cloud. Docker is one of the most popular open-source container platforms which does just that.


Containers vs. Virtual Machines

The industry standard is to use virtual machines (VMs) to do what containers do. Despite common misconceptions however, containers are not VMs. Containers are like apartment buildings, with microservices as the apartments. VMs are more like houses (yes, I love using analogies). VMs consist of everything needed to run the software plus a lot more that is not needed. Containers have a shared infrastructure where resources of the host are shared.

Monolithic Applications Also Benefit From Docker

While it is true that containers work particularly well for applications which have a microservices based architecture; monolithic applications can also benefit from Docker.

Here are just a few benefits that Docker brings to monolithic applications:

  • Scalability – Docker allows you to scale with demand by simply adding or removing containers.

  • Startup speed – VMs need to boot the guest OS before running software. Docker generally runs your software almost instantly.

  • Environment consistency – Docker containers provide a consistent environment which you can use for development, testing, staging and deployment of your application.

  • Portability – Docker makes it easier to move your app around, regardless of architecture.

  • Lightweight – Docker containers are fairly lightweight compared to traditional VMs as they share host resources i.e. operating system.

  • Version control – Although not its main purpose, Docker can act as a version control system for your application.

Setting Up Your Machine With Docker

The *getting started* guide on Docker has detailed instructions for setting up Docker on Mac, Linux and Windows.

Once you are done installing Docker, test your Docker installation by running the following:

$ docker run hello-world

Hello from Docker.

This message shows that your installation appears to be working correctly.


Here are some Docker terms which you may come across when using containers:

  • Containers – Created from Docker images and run the actual application. We create a container using `docker run`.

  • Docker Client – The command line tool that allows the user to interact with the daemon. More generally, there can be other forms of clients too – such as Kitematic which provide a GUI to the users.

  • Docker Daemon – The background service running on the host that manages building, running and distributing Docker containers. The daemon is the process that runs in the operation system to which clients talk to.

  • Dockerfile – A text file which contains commands which will result in assembling an image. The image can subsequently be used to create docker containers.

  • Images – The blueprints of our application which form the basis of containers.

  • Docker Hub – A registry of Docker images like Github is for source code. You can think of the registry as a directory of all available Docker images. If required, you can host your own Docker registries and can use them for pulling images.

Leave a Reply

Your email address will not be published. Required fields are marked *