Docker Series — What is Docker?

Over the last few weeks I’ve been helping a lot of people get started using Docker so I thought I would write up this blog series to help people get started using Docker. I will be writing a new blog each week to help readers get started with different docker topics starting with the basics, in this blog, all the way to advanced container scaling and more. So without further ado let’s jump right in!

So, what is Docker and why should you care?? If you are a programmer or in devops you may spend a lot of time preparing development or production environments. Maybe you use hypervisors like VirtualBox or VMware to run full virtual machines (VMs), complete with guest operating system, on your laptop or to quickly deploy servers. As may of you have realized storing and running these VMs takes up a lot of resources. Docker helps with this.

https://docs.docker.com/get-started/#virtual-machine-diagram

The diagram above illustrates how a normal virtual machine works. Notice how each virtual machine has its own copy of the OS. Removing the dependency of a guest operating system is one way in which Docker differentiate itself from traditional hypervisors.

https://docs.docker.com/get-started/#container-diagram

As you can see in the diagram above, Docker sits between your application and the host operating system (OS). Docker is able to share the host OS across multiple “Containers” rather than requiring each one to have and run its own full operating system. This allows you to encapsulate your application into a reusable module that can be plugged in and run on any machine where resources are available. This allows for more fine grained resource allocation and can minimize the amount of wasted cpu or memory resources. This notion of tightly packaged Docker containers is similar to the concept of shipping containers; which is where the term Docker containers comes from.

In the rest of this series I will show you how to build Docker images, run and manage containers, manage interaction between multiple containers, and finally how to scale up Docker beyond one machine.