What is Docker 
Published: 2020-08-23 11:34:41

**Part I : Introduction.**
**- What is docker.**
**- What is Containers.**
**- Need of Containers.**
**- Examples.**
**- Docker Architecture.**
  

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gd4bpg14xzn08xtkku04.jpg)  

**What is Docker:**

_Docker is use to manage the containers. it is a opensource software platform for building applications based on containers. 
it is a  tool that designed to make deployment easier and to create,run application inside a container._

**What is Container:**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/iy26d1zjvoqhtz325ws5.png)

_A container is isolated from each other.     
A container is a standard unit of software and it  basically used to reduce compatibility issues between various versions of components in software application and make make your application portable and run anywhere._

_it packages up code and all its dependencies so the application runs quickly and reliably._

_A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application code, runtime, system tools, system libraries and settings._

**Needs Of Containers:**

Due to containers, 
- High Availability.
- small footprint and portability. 
- the same hardware can support an exponentially 
  larger number of containers than virtual 
  machines.
- Flexible Scaling.
- dramatically reducing infrastructure costs and 
  enabling more apps to deploy faster.
- Less Maintenance.
- Fast.
- Reuseability of a code.

**Examples:** 
_- Google runs there applications inside containers like Gmail,Google Map,YouTube and may more.
- The popular game name as pokemon go also used the container to run, and handle the traffic._  

**Docker Engine:**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1vq9sk91mh0sjasgj7rg.png)

**Docker Demon-** Docker demon is service which runs in a background. it manages Docker images, containers, networks, and storage volumes.The Docker daemon constantly listens for Docker API requests and processes them.

**Docker CLI-** A command line interface client for interacting with the Docker daemon. Helps to manage the containers. 

**Docker Engine REST API**: An API used by applications to interact with the Docker daemon.

**Docker Architecture**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tckxs1h4ke39q5vgpkhs.png)

**In Docker architecture, there are three main blocks:**

**- Docker Client-**  The Docker client enables users to interact with Docker. The Docker client can reside on the same host.By using Docker client user can communicate with the docker hosts.
User can pass instruction like docker search, docker push, docker pull...

 
**- Docker Hosts-** Docker hosts docker demon is resides, which can takes off the images and containers.The Docker host provides a complete environment to execute and run applications.It comprises of the Docker daemon, Images, Containers, Networks, and Storage.

**-Docker Demon-** Docker demon is service which runs in a background. it manages Docker images, containers, networks, and storage volumes.The Docker daemon constantly listens for Docker API requests and processes them.

**-Images-**Images are a read-only binary template used to build containers. The images are store at docker registry.

**-Docker Registry-** Where all the images are saved.