Tuesday, October 31, 2017

4. Docker Architecture (Docker vs Virtualization)

                                         

Docker Architecture 

(Docker vs Virtualization) 



Virtualization :-  The following image shows the standard and traditional architecture of virtualization it could be a Bare Metal hypervisor or Hosted Hypervisor anyone..


1. The server is the physical server that is used to host multiple virtual machines.
2. The Host OS is the base machine such as Linux or Windows in case of Hosted.
3. The Hypervisor is either VMWare or Windows Hyper V that is used to host virtual machines.
4. You would then install multiple operating systems as virtual machines on top of the existing hypervisor as Guest OS
5. You would then host your applications on top of each Guest OS.

Docker :- 
The following image shows the new generation of virtualization that is enabled via Dockers.Let’s have a look at the various layers.


1. The server is the physical server that is used to host multiple virtual machine.
2. The host OS is base machine such linux or windows. So this layer remains same.
3. On top of OS we use to deploy the Docker Engine.
4. Than make a container and run the applications.
5. The main advantage in this architecture is that you don't need to have extra hardware for GUEST OS.

Docker architecture:- 


Docker user a client-server architecture. The docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface.


The Docker daemon:- 

The docker daemon (dockerd) listens for Docker API requests and manages Docker objects such as images, containers, networks nad volumes. A daemon can also communicate with other daemons to manage Docker services.





Docker Client:-
The Docker client (docker) is the primary way that many Docker users interact with Docker. When you use commands such as docker run, the
Client sends these commands to dockerd, which carries tham out.
The docker command user the Docker API. The Docker client can communicate with more than one daemon.

CONTAINERS:- A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.

   By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container’s network, storage, or other underlying subsystems are from other containers or from the host machine. 

   A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that are not stored in persistent storage disappear.


Docker Engine:- Docker Engine is a client-server application with these major components. 

* A server which is a type of long-running program called a daemon process (the dockerd command). 
* A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it what to do.
* A command line interface (CLI) client (the docker command).



The CLI uses the Docker REST API to control or interact with the Docker daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI.

The daemon creates and manages Docker objects, such as images, containers, networks, and volumes.

36 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

9. Docker container networking

                                Docker container networking          Docker takes care of the networking aspects so that the containers c...