In this article, we will look at the basics of docker and what’s the advantage of using it.
What is Docker?
Docker is an open-source platform for developing, running and shipping applications. This was developed by Docker, Inc in the year 2013.
It’s a platform as a service (PaaS) product that use OS-level virtualisation to deliver software packages called containers. Containers have everything that software needs to run including libraries, dependencies, runtime etc. that can run on any machines (Linux, mac, Windows). This enables to run on-premises, cloud.
Docker containers are lightweight, a single server or virtual machine that run multiple containers parallelly. Containers are isolated from one another and bundle their own software, libraries and configuration files and they can communicate through well-defined channel. As all of the containers share the services of a single operating system kernel, it uses lesser resources than virtual machines.
Docker is the operating system for containers. Its similar to Virtual machine virtualises server hardware, container virtualises the operating system of a server. Docker is installed on servers and provides command to build, start and stop containers.
Why we use Docker?
- It will consistently work regardless of the infrastructure (Linux or windows) and environments (Dev, Test etc)
- It uses lesser memory than virtual machines
- It will work in an isolated manner and provides security for applications
- Speeds up the application deployment
- Cost effective as it makes easier to run more code on each server
Where it can be used ?
- Building & running distributed microservices architecture
- Highly scalable data processing systems
- Continuous integration & delivery as it accelerates deployment
Other terminologies that are used which we should be aware of is
- Docker Image:
A docker image is a template that defines how containers can be realised. It’s a file which is used to execute code in a docker container. Docker image acts as starting point for docker. Images becomes containers during runtime.
- Docker Host:
A docker host is physical server or virtual machine in which Docker Daemon runs. Docker Daemon is responsible for building and running containers & it starts the containers with the help of image.
- Docker Hub:
A docker hub is repository for storing container images. It can be used to share, find and store repositories which can be kept public or private.
Hope this article was helpful to you.