0% found this document useful (0 votes)
2 views48 pages

Session1 Introduction To Docker

The document provides an overview of Docker, a Container as a Service (CaaS) platform that simplifies the development, deployment, and running of applications using containers. It highlights Docker's advantages over virtual machines, including isolation, lightweight nature, cost-effectiveness, and portability. Additionally, it explains Docker's architecture, orchestration tools, and workflow for building, shipping, and running containers.

Uploaded by

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

Session1 Introduction To Docker

The document provides an overview of Docker, a Container as a Service (CaaS) platform that simplifies the development, deployment, and running of applications using containers. It highlights Docker's advantages over virtual machines, including isolation, lightweight nature, cost-effectiveness, and portability. Additionally, it explains Docker's architecture, orchestration tools, and workflow for building, shipping, and running containers.

Uploaded by

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

DOCKER

Topics for Today


Introduction to Docker

What is Docker?

Why Docker?

How Docker differ from VMs

Docker Architecture

Docker Orchestration

Workflow
What is Docker?

Docker is a CaaS (Container as a Service) platform


More like Virtual Machines


Easy to develop, deploy and run any applications by using
containers


Easy to Package and ship
Why Docker?

Isolated


Lightweight


Simple to use


Cost effective


Portability
Isolation

Each containers totally isolated from other containers


even its running on same machine
Isolation

If one container become unhealthy, it won't affect


other containers
Lightweight
Virtual Machine Docker Container

VM size - 10 GB Container size - 10 GB


OS – ubuntu OS – ubuntu

OS
45%-size OS
2%-size

RAM : RAM :

CPU : CPU :
Cost effective
APP 1 – Java app with java 7

APP - 1
Cost effective
APP 1 – Java app with java 7
APP 2 – Java app with java 8

APP - 2

APP - 1
Cost effective
APP 1 – Java app with java 7
APP 2 – Java app with java 8
APP 3 - python

APP - 2

APP - 1

APP - 3
Cost effective
APP 1 – Java app with java 7
APP 2 – Java app with java 8
APP 3 - python

P -2
AP

P -1
AP

P -3
AP
Portability

BUILD
Portability

BUILD SHIP
Portability

BUILD SHIP RUN


How Docker differ from VMs?
● Docker Containers and VMs both build on top of server and host OS

● Host OS can be any Operating System like Ubuntu, windows

Host OS Host OS

SERVER SERVER

Virtual Machine Docker


How Docker differ from VMs?
● VM uses Hypervisor layer to create and run VMs

● Docker uses Docker Engine to create and run Containers

Hypervisor Docker Engine

Host OS Host OS

SERVER SERVER

Virtual Machine Docker


How Docker differ from VMs?
● Each VMs require unique OS to run Applications
● Each VM has its own bins/libs
VM 1 VM 2 VM 3

App 1 App 2 App 3

Bins/ Bins/ Bins/


Libs Libs Libs

Guest Guest Guest


OS OS OS

Hypervisor Docker Engine

Host OS Host OS

SERVER SERVER

Virtual Machine Docker


How Docker differ from VMs?
● Docker container does not require separate guest OS to run applications
● Container will share bin / libs of Host OS
VM 1 VM 2 VM 3

App 1 App 2 App 3

Container 1 Container 2 Container 3


Bins/ Bins/ Bins/
Libs Libs Libs
App 1 App 2 App 3

Guest Guest Guest Bins/ Bins/ Bins/


OS OS OS Libs Libs Libs

Hypervisor Docker Engine

Host OS Host OS

SERVER SERVER

Virtual Machine Docker


Docker Architecture

CLIENT Docker Host REGISTRY

Docker Daemon

Container Images
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon

Container Images
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon

Container Images
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon


docker pull
Container Images
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon


docker pull
Container Images
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon


docker pull
Container Images
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon


docker pull
Container Images
docker run
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon


docker pull
Container Images
docker run
Docker Architecture

CLIENT Docker Host REGISTRY

docker build Docker Daemon


docker pull
Container Images
docker run
Docker Architecture
● Docker uses client-server architecture
● Docker Client and Daemon can be in same system
● Docker Client
● Client use to command docker daemon
● Client uses REST API to communicate with Docker daemon through UNIX sockets or
network interface
● Docker daemon
● Manage Docker images, containers, networks and volumes
● Based on API requests docker daemon operates
● Docker Registry
● Place which stores Docker images in form of Public and Private
● Public registries are Docker Hub and Docker Cloud
● Private registries are Docker Data-center and Docker Trusted Registry
Docker Orchestration

Docker Machine Used to provisions docker hosts and install docker engine on
hosts

Docker Swarm Used to make docker cluster with master and slave machines
and schedules containers

Docker Compose Used to create and manage multi-container applications


Docker – use case

Developer developing a application which


supported only java7 and OS – Red hat
Docker – use case

Tester machines running on ubuntu 16.04


Docker – use case

For an single application total tester environment has to


be change.
Its tooo pain....
Docker – use case

Same time developers also can't recreate his


application
Docker – use case

Its DOCKER turn........


Docker – use case

Developer using docker engine in his machine and


using container to develop his application which
supported only java7 and OS – Red hat
Docker – use case

Tester machines running on ubuntu 16.04 and


additionally he having docker engine
Docker – use case

Developers and Tester environments are totally


different from each other
Docker – use case

But still testers can run the application without recreating his
tester environment by using docker.
Docker Workflow

Host - 1
Docker Workflow

Host - 1
Docker Workflow

build

Host - 1
Docker Workflow

Docker container

build

Host - 1
Docker Workflow
Docker hub

push
Docker container

build

Host - 1
Docker Workflow
Docker hub

push
Docker container

build

Host - 1 Host - 2
Docker Workflow
Docker hub

push
Docker container

search
build
Pull / run

Host - 1 Host - 2
Docker Workflow
Docker hub

push
Docker container

search
build
Pull / run

Host - 1 Host - 2
Thank You

You might also like