Docker

Introduction
Docker is advance version virtualisation .It is used for containerization.
Docker is an open source centralization platform design to create deploy and run application.
Docker used container on host O.S to run application. It allows apps to use the same linux kernel as a system on host computer rather than creating a whole virtual O.S.
We can install docker on any O.S but docker engine runs natively on linux distribution.
Docker written in “GO” language.
Before Docker, many users faces the problem that a perticular code is running in the developers system
Docker release in march 2013, it is develope by solomen hykes and sabastian pahl.
Docker is a set of platform as a service that uses O.S level virtualization whereas VMware uses hardware level virtualization .
Docker architecture:

Advantages Of Docker:
No pre-allocation of ram.
CI efficiency : Docker enable you to build a container image and use that same image across every step of the deployment process
Less cost
It is light in weight
It can run on physical hardware virtualization hardware or on cloud.
You can re-use the image
It took very less time create container
Disadvantages Of Docker:
Docker is not a good solution for application that requires rich GUI(Graphical User Interface)
Difficult to manage large amount of containers.
Docker does not provide cross platform compatibility means if an application is design to run in a docker container on windows, then it can’t run on linux or vice-versa.
Docker is suitable when the development O.S and testing O.S are same if the O.S is different we should use VM.
No solution for data recovery & backup.
Docker installation
I'm using ubuntu so i will run this command on my terminal.
apt install docker.io

After the installation check docker status.run this command
systemctl status docker

My docker service is already running. If you want to start your docker service. run this command.
systemctl start docker
it will start your docker service.

As we have already installed docker through above steps. now this time to run docker command.
Use the docker run command to start a new container and interact with it through the command line.
docker run nginx

To see all running containers
docker ps -a

Use the
docker inspectcommand to view detailed information about a container or image.-We can use the inspect command to get low-level configuration information about various Docker objects like images, containers, volumes, networks, nodes, etc.
To see, for example, on which node a container is deployed or what ports it listens to.
Use the
docker portcommand to list the port mappings for a container.
Use the docker stats command to view resource usage statistics for one or more containers.docker stats command is used to see live . The command supports CPU, memory usage, memory limit, and network IO metrics.*

Use the
docker topcommand to view the processes running inside a container.
docker top <container ID >command allows users to display the ps output for the main process of a given container ID or name.
Use the
docker savecommand to save an image to a tar archive.
Use the
docker loadcommand to load an image from a tar archive.
These all commands involve simple operations that can be used to manage images and containers.
Comments
Join the discussionNo comments yet. Be the first to comment.


