What should you know about Docker?

jeshan khan
3 min readMar 9, 2019

What is Docker?

Docker is a tool which is used to automate the deployment of applications in lightweight containers so that applications can work efficiently in different environments.

A container is a software package that consists of all dependencies required to run on applications.

Advantages of Docker

Difference between a virtual machine and docker

Virtual machine

  • A virtual machine is very heavyweight.
  • Occupy a lot of memory space.
  • Running multiple virtual machines leads to unstable performance.

Docker

  • Docker containers are lightweight and provide the same functionality as a virtual machine.
  • Docker occupies less space.
  • Multiple containers can run on the same hardware and provides better performance as they are hosted in a single docker engine.

Docker Engine

Client-Server architecture of Docker-Engine

Docker engine is nothing but a base engine installed on your host machine to build and run containers using docker components and services.

For more detailed information on Docker engine go to this page.

Client side

  • A command line interface(CLI) client(the docker command)

Rest API

  • A Rest API specifies interfaces that programs can use to talk to the daemon and instruct it what to do.

Server side

  • A server is a type of long-running program called a daemon process.

Docker daemon checks the client request and interacts with the operating system in order to create or manage containers.

Components of Docker

There are mainly four major components of docker

  • Docker Client and Server
  • Docker Images
  • Docker Container
  • Docker Registry

Docker client is accessed from the terminal and a Docker Host runs the Docker Daemon and registry.

The machine running the Docker server is called as Docker Host

A user can build Docker Images and run Docker Containers by passing commands from the Docker Client to Docker server

Docker Image

  • Docker Image is just a template with instructions, which is used for creating Docker Containers.
  • A Docker Image is built using a file called Docker file.
  • Docker Image is stored in a Docker Hub or in a repository.

Docker Container

  • Docker Container is a standalone executable software package which includes applications and their dependencies
  • Numerous Docker Containers run on the same infrastructure and share operating system (OS) with its other containers
  • Each application runs in isolation

Docker Registry

  • Docker is an open source server-side service used for hosting and distributing images
  • Docker also has its own default registry called Docker Hub

Docker Hub link - https://hub.docker.com

There are two types of repositories public and private.

  • Pull and Push are the commands used by users in order to interact with a Docker Registry
  • In order to build a container, pull command is used to get a Docker Image from the Docker repository
  • With push command, a user can store the Docker Image in Docker Registry

I hope you enjoyed this article, I’m currently still exploring the Docker world, so i am open to accept any feedback or contributions.

Thanks for reading!

--

--