Docker - 1
What is docker?
Container is like a virtual machine.
Docker is a tool which create the VM. It is a advance version of virtualisation.
Docker engine is just like a hypervisior.
what is docker architecture and container?
-> Docker is an open-source centralised platform designed to create, deploy and run applications.
-> Docker was first release in March 2013. It is developed by solomon hykes and sebastian pahl.
-> Docker uses container on the host O.S. to run applications. It allows applications to use the same linux kernal as a system on the host computer, rather than creating a whole virtual O.S.
--> Docker is a set of Platform as a service that uses O.S. level virtualization whereas VMware uses Hardware level viruatlisation.
-->we can install docker on any O.S. but Docker engine runs natively on Linux distribution.
--> Docker written in 'go' language.
--> Docker is a tool that performs O.S. level virtualization also known as containerization .
--> Before Docker, many users faces the problem that a particular code is running in the developer's system but not in the user's system.
Question - do we have os in container or not?
ans - yes, container has no operting system but it has 5% files of operating system files.
==============================================================================
Advantage of Docker
========================
1) No - pre-allocation of RAM.
2) CI (continous integration)efficiency --> Docker enables you to build a container image and use that same image across every step of the deployment process.
3) Less cost
4) It is light in weight.
5) It can run on physical H/w /Virtual H/w or on cloud.
6) you can re-use the image.
7) It took very less time to create container.
----------------------------------------------------------------
Disadvantage of docker
-----------------------
1)Docker is not a good solution for application that requires rich GUI.
2) Difficult to manage large amount of containers.
3) Docker does not provide cross-platform compatibility means if an application is designed to run in a docker container on Windows, then it can not run on linux or vice-versa.
4) Docker is suitable when the development O.S and testing O.S. are same if the O.S. is different, we should use VM. (If development team has ubuntu os on host side then testing team should have ubuntu os at their host side otherwise container image will not work.)
5) No solution for data recovery and Backup.
=================================================
Components of Docker ecosystem.
----------------------------------
Docker dameon
---------------
-> Docker daemon runs on the host O.S.
-> It is responsible for running container to manages docker services.
-> Docker daemon can communicate with other daemons.
Docker client
------------
--> Docker users can interact with docker daemon through a client.(CLI)
--> Docker client uses commands and rest api to communicate with the docker daemon.
--> When a client runs any server command on the docker client terminal, the client terminal sends these docker commands to the docker daemon.
--> It is possible for docker client to communicate with more than one daemon.
Docker Host
-----------
Docker host is used to provide an environment to execute and run applications. It contains the docker daemon, images, containers, networks and storage.
Docker Hub/registry
-----------------------
Docker registry manages and stores the docker images.
There are two types of registries in the docker.
1) Public Registry -> Public registry is also called as docker hub.
2) Private Registry -> It is used to share images within the enterprise.
Docker Images
------------
--> Docker images are the read only binary templates used to create docker containers.
or
--> single file with all dependencies and configuration required to run a program.
Ways to create an images.
---------------------------
1) take image from docker hub.
2) create image from docker file.
3) create image from existing docker containers.
--------------------------------------------------------------------------
Docker container
---------------
--> Container hold the entire packages that is needed to run the application
or
In other words, we can say that the image is a template and the container is a copy of the template.
--> Container is like a virtual machine.
--> images becomes contianer when they run on docker engine.
1. Docker daemon
2. docker host
3. docker client
4. docker images
5. docker container
6. docker hub
Comments
Post a Comment