Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views25 pages

Docker

The document provides an overview of virtualization and containerization technologies, highlighting their definitions, advantages, and disadvantages. It specifically discusses Docker as an open platform for developing and managing applications in containers, detailing its architecture, components, and various objects like images, containers, networks, and storage volumes. Additionally, it explains the types of hypervisors and virtualization, emphasizing the efficiency and flexibility that these technologies offer in IT environments.

Uploaded by

pnsocial acc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views25 pages

Docker

The document provides an overview of virtualization and containerization technologies, highlighting their definitions, advantages, and disadvantages. It specifically discusses Docker as an open platform for developing and managing applications in containers, detailing its architecture, components, and various objects like images, containers, networks, and storage volumes. Additionally, it explains the types of hypervisors and virtualization, emphasizing the efficiency and flexibility that these technologies offer in IT environments.

Uploaded by

pnsocial acc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

DOCKER

- VELOCITY TRAINING INSTITUTE


- SHANTANU MAHAJAN (SR ENGG DEVOPS)
WHAT IS VIRTUALIZATION?

• Virtualization is technology that lets you create useful IT services using


resources that are traditionally bound to hardware.
• It allows you to use a physical machine’s full capacity by distributing its
capabilities among many users or environments.
• Virtualization is a technique of importing a Guest OS on the top of the
host OS.
• This technique was a revelation at the at the beginning as it allowed
developers to run multiple OS in different VMs on the same physical
host.
ADVANTAGES

• Reduced capital and operating costs.


• Increased IT productivity, efficiency, agility and responsiveness.
• Minimized or eliminated downtime.
• Faster provisioning of applications and resources.
• Greater business continuity and disaster recovery.
• Simplified data center management.
HOW DOES VIRTUALIZATION WORK?

• Software called hypervisors separate the physical resources from the virtual
environments—the things that need those resources.
• Hypervisors can sit on top of an operating system (like on a laptop) or be installed
directly onto hardware (like a server), which is how most enterprises virtualize.
• Hypervisors take your physical resources and divide them up so that virtual
environments can use them.
• A hypervisor, also known as a virtual machine monitor or VMM, is software that
creates and runs virtual machines (VMs).
• A hypervisor allows one host computer to support multiple guest VMs by virtually
sharing its resources, such as memory and processing
TYPES OF HYPERVISORS

• There are two main hypervisor types, referred to as “Type 1” (or “bare
metal”) and “Type 2” (or “hosted”).
• A type 1 hypervisor acts like a lightweight operating system and runs
directly on the host’s hardware, while a type 2 hypervisor runs as a
software layer on an operating system, like other computer programs.
• The most commonly deployed type of hypervisor is the type 1 or bare-
metal hypervisor, where virtualization software is installed directly on
the hardware where the operating system is normally installed.
TYPES OF VIRTUALIZATION

• Data virtualization
• Desktop virtualization
• Server virtualization
• Operating system virtualization
• Network functions virtualization
DISADVANTAGES OF VIRTUALIZATION

• Running multiple VMs leads to unstable performance


• Hypervisors are not as efficient as the host OS.
• Boot up process is long and takes time
• Sharing is difficult.
CONTAINERIZATION

• Containerization is a form of virtualization where applications run in isolated user


spaces, called containers, while using the same shared operating system (OS).
• A container is essentially a fully packaged and portable computing environment:
• Everything an application needs to run—its binaries, libraries, configuration files,
and dependencies—is encapsulated and isolated in its container.
• The container itself is abstracted away from the host OS, with only limited access
to underlying resources—much like a lightweight virtual machine (VM).
ADVANTAGES OF CONTAINERIZATION

• https://hentsu.com/docker-containers-top-7-benefits/
DOCKER

• Docker is an open platform for developing, shipping, and running


applications.
• Docker enables you to separate your applications from your
infrastructure so you can deliver software quickly.
• With Docker, you can manage your infrastructure in the same ways you
manage your applications.
• By taking advantage of Docker’s methodologies for shipping, testing,
and deploying code quickly, you can significantly reduce the delay
between writing code and running it in production.
THE DOCKER PLATFORM

• Docker provides the ability to package and run an application in a


loosely isolated environment called a container.
• The isolation and security allow you to run many containers
simultaneously on a given host.
• Containers are lightweight and contain everything needed to run the
application, so you do not need to rely on what is currently installed on
the host.
• You can easily share containers while you work, and be sure that
everyone you share with gets the same container that works in the
same way.
DOCKER ARCHITECTURE

• Docker uses 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.
• Another Docker client is Docker Compose, that lets you work with
applications consisting of a set of containers.
COMPONENTS

• Docker Engine
Docker Engine is an open source containerization technology for building
and containerizing your applications. Docker Engine acts as a client-
server application with:
• A server with a long-running daemon process dockerd.
• APIs which specify interfaces that programs can use to talk to and
instruct the Docker daemon.
• A command line interface (CLI) client docker.
COMPONENTS

• The Docker daemon

The Docker daemon (dockerd) listens for Docker API requests and manages Docker objects
such as images, containers, networks, and volumes.
A daemon can also communicate with other daemons to manage Docker services.
• The 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 them out.
The docker command uses the Docker API. The Docker client can communicate with more
than one daemon.
COMPONENTS

• The Docker registries


• A Docker registry stores Docker images. Docker Hub is a public registry
that anyone can use, and Docker is configured to look for images on
Docker Hub by default. You can even run your own private registry.
When you use the docker pull or docker run commands, the
required images are pulled from your configured registry.
When you use the docker push command, your image is pushed
to your configured registry.
DOCKER OBJECTS

• When you use Docker, you are creating and using images, containers,
networks, volumes, plugins, and other objects.
• These we will discuss one by one.
OBJECTS

• 1. Images
• Images are nothing but a read-only binary template that can build
containers.
• They also contain metadata that describe the container’s capabilities
and needs.
• Images are used to store and ship applications.
• An image can be used on its own to build a container or customized to
add additional elements to extend the current configuration.
DOCKER IMAGE

• You might create your own images or you might only use those created by
others and published in a registry.
• To build your own image, you create a Dockerfile with a simple syntax for
defining the steps needed to create the image and run it.
• Each instruction in a Dockerfile creates a layer in the image.
• When you change the Dockerfile and rebuild the image, only those layers
which have changed are rebuilt.
• This is part of what makes images so lightweight, small, and fast, when
compared to other virtualization technologies.
DOCKER 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 NETWORKS

• Docker networking is a passage through which all the isolated container communicate.
There are mainly five network drivers in docker:
• Bridge: It is the default network driver for a container. You use this network when your
application is running on standalone containers, i.e. multiple containers communicating with the
same docker host.
• Host: This driver removes the network isolation between docker containers and docker host. You
can use it when you don’t need any network isolation between host and container.
• Overlay: This network enables swarm services to communicate with each other. You use it when
you want the containers to run on different Docker hosts or when you want to form swarm
services by multiple applications.
• None: This driver disables all the networking.
• macvlan: This driver assigns mac address to containers to make them look like physical devices.
It routes the traffic between containers through their mac addresses. You use this network when
you want the containers to look like a physical device, for example, while migrating a VM setup.
DOCKER STORAGE VOLUMES

• You can store data within the writable layer of a container but it requires a storage driver. Being
non-persistent, it perishes whenever the container is not running. Moreover, it is not easy to
transfer this data. With respect to persistent storage, Docker offers four options:
• Data Volumes: They provide the ability to create persistent storage, with the ability to rename
volumes, list volumes, and also list the container that is associated with the volume. Data Volumes are
placed on the host file system, outside the containers copy on write mechanism and are fairly efficient.
• Volume Container: It is an alternative approach wherein a dedicated container hosts a volume and to
mount that volume to other containers. In this case, the volume container is independent of the
application container and therefore you can share it across more than one container.
• Directory Mounts: Another option is to mount a host’s local directory into a container. In the
previously mentioned cases, the volumes would have to be within the Docker volumes folder, whereas
when it comes to Directory Mounts any directory on the Host machine can be used as a source for the
volume.
• Storage Plugins: Storage Plugins provide the ability to connect to external storage platforms. These
plugins map storage from the host to an external source like a storage array or an appliance. You can
see a list of storage plugins on Docker’s Plugin page.

You might also like