Let’s start by looking back on how applications were hosted and how it has evolved. Initially, we had one application running on a single server with its own dedicated memory, CPU and disk space. This model proved to be highly costly in order to host high load applications.
Virtual Machine
Next, we moved to Virtual Machines (VM), also called as Hypervisor Virtualization. We could now run multiple applications on each virtual machine, each one being a chunk of the actual physical server and having its own memory, CPU and disk space. However, the drawback was that each Virtual Machine needed its own Operating System and this incurred additional overhead of licensing costs, security patching, driver support, admin time etc.
Docker arrived with a solution to this problem. There is just one OS installed on the server. Containers are created on the OS. Each Container is capable of running separate applications or services. Here’s a comparative illustration of Containers vs Virtual Machines:
- Docker is said to be derived from the words: docker + worker -> Docker.
- It is written using Golang
- Is Open source with Apache license 2.0.
Let’s look at what the following mean:
Docker Container: It is a software that contains the code and all its dependencies to facilitate an application to run quickly and reliably irrespective of the computing environment
Docker Container Image is a lightweight, standalone, executable package that contains everything to run an application: the code, runtime, system tools, libraries and settings. Container Images become Containers at runtime.
Docker Hub is a public docker repository to store and retrieve docker Images. This is provided by Docker, however there are other third-party registries as well.
Open Container Initiative or OCI is responsible for standardizing container format and container runtime.
Why is Docker so popular?
- A Docker image can run the same way irrespective of the server or the machine. It is hence very portable and consistent. It eliminates the overhead of setting up and debugging environment.
- Another reason is Rapid Deployment, the deployment time is reduced to a few seconds.
- They start and stop much faster than Virtual Machines
- Applications are easy to scale as containers can be easily added from an environment.
- Helps in converting a monolithic application into Microservices. [To read more, refer Microservices]
- last but not the least, it is Open Source.
Pingback: Docker Compose – Containerizing a Django Application – Reverie
Pingback: Docker – Deep Dive – Reverie