Shashikant shah

Tuesday 8 September 2020

What Is Docker And Docker Containers. Part-1

What is Docker ? 

1. Docker is an open-source project and Container management service.
2. Docker work client base architecture and made up to Go language. 
3. Docker is application “platform as a service” (PaaS) model. 
4. Docker first release of docker was in March 2013.
5. Docker is basically three keywords based on: develop, ship and run anywhere. 
6. The concept of Docker is for developers to easily develop applications, ship them as containers and deploy these containers anywhere.
7. Docker uses a technology called namespaces to provide the isolated workspace called the container. 

 Benefits of Docker: - 

 1. Docker actually, reduces the size of development environment of every application.
 2. One of the main Docker’s benefits is its portability you can deploy containers anywhere like cloud VMs and physical machines. 
 3. Since Docker containers are lightweight, they are very easily scalable. 
 4. You don’t need to pre-allocate any RAM in containers.
 5. Version control function, If the update process fails, docker makes a rollback to a preview’s version  in few minutes. 
 6. Docker provide to run multiple containers and deploy separately multiple applications.


Docker Engine Workflow :-

Client (docker cli) -->  RESET API --> server docker daemon

Docker CLI :- docker cli command line interface  communicate to RESET API.

RESET API :- A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it what to do.

docker daemon :- A server which is a type of long-running program called a daemon process.


What is Container :-

1.container separately provide like a isolated workspace we can deployed application and dependencies.

2. Containers isolate the application from accessing the resources as these are VMs. 

3.container is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries.

4. Docker uses a technology called namespaces to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.

  (i) PID namespace :- Process isolation (PID: Process ID).

  (ii) NET namespace :- Managing network interfaces (NET: Networking).

  (iii) IPC namespace :- Managing access to IPC resources (IPC: InterProcess          

      Communication).  

  (iv) MNT namespace :- Managing filesystem mount points (MNT: Mount).

  (v) UTS namespace :- Isolating kernel and version identifiers. (UTS: Unix Timesharing

      System)

 

Control Groups :- A cgroup limits an application to a specific set of resources. You can limit the memory available to a specific container.

Union file systems or UnionFS :- Docker Engine uses UnionFS to provide the building blocks for containers. Docker Engine can use multiple UnionFS variants, including AUFS, btrfs, vfs, and DeviceMapper.

container format use :- The default container format is libcontainer. In the future, Docker may support other container formats by integrating with technologies such as BSD Jails or Solaris Zones.

 

Components of Docker :-

There are three internal components that need to be understood

1.      Docker Images: Docker images are read-only templates; these images contain the operating system with the required libraries/tools and the applications.

2.      Docker Registries: Docker registries hold these images. These registries are like public/private repositories. The public Docker registry is called Docker Hub and has a huge collection of images with various applications embedded.

3.      Docker Containers: A Docker container holds everything that is needed for an application to execute. Containers are created from a Docker image. Similar to virtual machines, containers can be started, stopped, moved and deleted. Each container provides an isolated and secure environment for applications to run.


No comments:

Post a Comment