Docker — A Beginner’s Guide

Docker is an Open Source Centralized PaaS (Platform as a Service) that uses O.S. level virtualization to create, deploy and run applications in packages known as Containers.

It was first release on March, 2013 written on GO language by Solomon Hykes and Sebastian.

To setup docker in AWS (Linux)

Here is the list of some basic docker commands.

But before Docker, everyone were using VMware. So what is the need to introduce docker ?

Before Docker came into effect, industries were facing many issues regarding the testing of the applications. Suppose the development team has build an application in a particular environment where they have all the required packages and updates but when the same application is given to testing team they started facing problem because they have to create a same environment like development team to test those applications. Thus to overcome this, here comes the need of DOCKER which helps us to virtualize our system as the same way we want without changing our default system’s environment.

Hypervisor :- It is a software or firmware that creates and run virtual machines. Also called VMM (Virtual Machine Manager).

Docker Daemon :- It runs on host O.S. and responsible to run containers to manage the services.

Besides this Docker has also other Advantages over VMware:-

  1. No pre-allocation of RAM. It will use the RAM of hardware as per the need and that too when you will allocate it to the container that’s why you can create as many containers as you want but in VMware you have to pre-allocate your RAM and have to create containers* as per the limitation of RAM only.
  2. It is less costly and light in weight. It can run on physical hardware, virtual hardware or even on cloud.
  3. It takes very less time to create the containers and also you can re-use the images**.
  4. C.I. Efficiency :- Docker enables you to build a container image and use that same image across every step of your deployment process.
  • * Containers :- It is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
  • *Images :- It is basically a copy of a software, packages, operating systems, containers etc. It is used to save the time of developers and operational teams as suppose ops team want the same environment as of dev teams then, the dev team will create a copy(Image) of their environment and provide it to the ops team.

There are basically two methods to create an image of a container :-

  1. To create an image using basic commands
  2. To create an image using Dockerfile

But every tech thing has its own pros and cons. So now lets look for some of the Disadvantages too :-

  1. It is not a good solution for application that requires rich GUI.
  2. It doesn’t provide a cross-platform compatibility.
  3. No solution for data recovery and backup if all the containers get deleted.
  4. Sometimes difficult to manage large amount of containers.

Workflow of Docker :-

From the image given above we can clearly depicts that how do we perform on Docker on our daily basis. Firstly a developer creates a Dockerfile or write some commands to create a container from the image pulled from docker hub and then after we have completed our work or created the environment successfully then we can again push that image of our container to the Docker Hub so that others may use it too.

** To push a Docker image in a Docker Hub.

Docker Volume :-

Volume is simply a directory or a folder inside our container that act as storage folder to store all your softwares , packages, images, files and all other stuffs.

We can also share the volume between as many containers as we want and benefit of doing this is there will be only one volume dir and all the other containers will store their packages in that dir and everyone can see what package is added to that volume dir and from which container.

Volume mapping can be done between

  1. Host and Container
  2. Container to Container

Benefits of using Volume :-

  1. Decoupling from Storage.
  2. Share volume among different containers
  3. Attach volume to containers
  4. On deleting containers, volume does not deletes

Ways of Creating a Volume :-

  1. Using Basic Commands
  2. Using Dockerfile

To create your container access globally you have to learn port expose but it is not possible to write it down about it here but the process of doing is 👇 👇

Steps of how to Port-Expose a container ??

NOTE :- This is not the end of Docker. There is a lot more to discover and read on this topic. This was just a basic intro of Docker so that beginners can understand about it :)

My other publications :-

  1. “Ultimate guide or brief of AWS(Amazon Web Services)”
  2. “Microsoft Learn Student Ambassador.”

Connect with me on 👇👇

1. LinkedIn

2. GitHub

3. Twitter

4. Instagram


5. Medium


MERN Developer | Cloud (AWS) | Java | Tech Content Writer | Love to work on real life projects