What is Docker ?
Benefits of Docker: -
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