Introduction to Docker

Overview of Docker

Supun Sandaruwan
LinkIT
3 min readJun 10, 2020

--

Photo by Pixabay from Pexels

If you work with IT you might have heard this word before. What is Docker? Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. If not we can say docker is a containerization platform that your app and it all dependencies together in the form called a docker container. This environment can happen in production or when staging your server. Docker pulls the dependencies needed for your application to run from the cloud and configures them automatically. You don’t need to set any extra configurations.

When we want to deploy an application in a selected environment, docker is very important. Think about a situation like this. Imagine we have a deployed an application running on Node.js 13.0.0 on your server and want to deploy a new application that requires Node.js 14.0.0 on the same server. Here it will cause some version conflict. Our application will not perform well or application will fail.

In situations like this, we might have to use Docker to sandbox or containerize the new application to run without affecting the old application. This brings us to Docker containers.

Docker Container

Screenshot from Author

According to the above image, it contains your application, some of the system calls, some part of the kernel, some chunk of OS and
also include some part of the hardware specification. This is the exact containerization. A Docker container differs from a virtual machine. Docker container doesn’t require to include a separate OS. Instead, it relies on the kernel’s functionality.

towardsdatascience.com

In a virtual machine, there is a part called Hypervisor on OS. Virtual machine Guest OS is on this Hypervisor that uses many resources in our machine. When we use docker containers, applications are on the docker container engine. The hypervisor is replaced by the Container engine. So that’s why Docker is very famous in the world. When considering virtual machines, the Docker container is most suitable because of the below reasons.

  • docker is lightweight
  • it is always portable
  • fast than a virtual machine
  • very easy to dependency management
  • better use of resources
  • can handle the most complex applications also

Docker Image

It is exactly similar to a “snapshot” in other virtual machine environments. It is a record of a Docker virtual machine, or Docker container, at a point in time. Think of a Docker image as a digital picture. A Docker container can be seen as a printout of that picture. Docker images have the special characteristic of being immutable. They can’t be modified, but they can be duplicated and shared or deleted. The immutability is useful when testing new software or configurations because no matter what happens, the image will still be there, as usable as ever.

--

--