All about Docker .

# A 10 min read will make you learn about containerisation.

Let start!.

Overview what we study in this whole:

  • What is Docker.
  • Docker Components.
  • Docker Architecture.  
  • Docker Hub.
  • Docker Registry.
  • Docker Network.

What is Docker ?

Docker , it is a tool by which we can make containers of the image that are present on the docker hub. It give the way to the developers to package the applications with all its dependencies and operating system to execute the same in any platform and environment. 
By using this open source tool  we as a user , get rid of downloading the applications make it to run on our system by downloading all its dependencies and after doing lot of effort , if the application failed to run and error comes , we waste our time in resolving that error by surfing all around . Thus in this fast technology something should be there to do  all these things with ease and time efficient .So, Docker is use for this purpose .

Docker Components

  • Docker client and Sever.
  • Docker image .
  • Docker container.
  • Docker registry.
Now we understand what is meant by Docker client and server(daemon).
If we have to talk with Docker server first we have to send request to Docker client and client will talk to server .We do not  send request directly to server .Thus client is the intermediate between the user and the server .


In the picture after writing docker version in your terminal you get all information about your docker client and docker server.






Docker Images

Image are nothing but a package of filesystem snapshot and start up command pack into one things which termed as image.There are lot of images which are present on Docker hub of different applications  from which you can pull any and run on your system .
Once a Image is pulled from hub it stored into your cache because if the user want the same image to run again it will send request to client and client send to server , thus sending same request .
So, in order to reduce latency and not to send the same request to server the server(daemon) stored the pull image to the system cache so it can be used later on, if the user wants.


Docker Containers 

We see in order to run a particular applications we just pull the image of the same ,but when we run this image this image converts into its container and take the resources (ram, storage , ..) accordingly which is specify in its snapshot.
Thus , now  the container is formed which do not have to deal with  what are running outside it (it now become isolated from the external environment )and have to focus on only to running itself if the user wants to


Docker Architecture

Docker Server (Daemon) is at the base or laying the bridge , on the top Rest API , Client talk to them to send request to the Server. On top of Client Manager manages the things and components of Docker .



Below picture shows that the registry  is also connected to the Server for communication about push and pull of Custom image of  any applications you made.



Docker Registry

It is the place of all the images which are stored with different versions and in docker they are specified by their tags.A docker registry is organised in docker repository  in which all versions are hold or store of a specific image .
You can also make your private repository and can push and pull images from that registry which is simple to use and efficient .


Docker Some Basic Commands:

  • docker run [image name : tag]
Its is used to pull image from docker hub and convert it into container and run it on your system.
  • docker images
It is used to see all the images in your cache that you earlier pull from docker hub .
  • docker ps 
It is used to see the running containers.
  • docker ps –a
It is used to see the running and not running containers (means all container that are running or not running).
  • docker rm [container id]
It is used to remove the stop container .
  • docker rmi [image name/ image id]
It is used to remove the image whose container are not formed or are killed or removed.
  • docker stop [container id]
It is used to stop the container .
  • docker run –d –-name=[container name] image name : tag
It is used to name the container formed of specific image and run in it detach(-d) mode .
  • docker run –p host port :container port image name : tag
It is used to allocate the port(-p) of container to the host for see what the applications is working .
  • docker build .
It is used to build the Dockerfile for pushing it to the registry.
  • docker-compose up 
It is used to start and run an entire app on a stand lone host that contains multiple services.
  • docker network ls
It is used show all the network which are present in the images which they are attached.
  • docker inspect [container id/ network name]
It is used to inspect the whole thing of that specific container or network.
  • docker run –network=[network name] image
It is used to attach the container with the specify network.











Comments

Popular posts from this blog

5G Call Flow : Deregistration Procedure and PDU Session Establishment

BRIEF OF VIRTUALISATION