SlideShare a Scribd company logo
1 of 26
Docker 
Architecture 
based 
on 
v 
1.3 
Compiled 
by 
Rajdeep 
Dua 
Twi?er 
: 
@rajdeepdua 
Oct 
2014 
Tuesday, November 4, 14
Before 
we 
get 
started 
• What 
is 
a 
Container? 
– Group 
of 
processes 
contained 
in 
a 
Isolated 
Environment 
– IsolaNon 
provided 
by 
Concepts 
like 
cgroups 
and 
namespaces 
• What 
is 
Docker? 
– ImplementaNon 
of 
a 
container 
which 
is 
portable 
using 
a 
concept 
of 
image. 
Tuesday, November 4, 14
CGroup 
• Limit, 
account, 
and 
isolate 
resource 
usage 
(CPU, 
memory, 
disk 
I/O, 
etc.) 
of 
process 
groups. 
• Resource 
limi@ng: 
groups 
can 
be 
set 
to 
not 
exceed 
a 
set 
memory 
limit 
— 
this 
also 
includes 
file 
system 
cache. 
• Priori@za@on: 
some 
groups 
may 
get 
a 
larger 
share 
of 
CPU[8] 
or 
disk 
I/O 
throughput. 
• Accoun@ng: 
to 
measure 
how 
much 
resources 
certain 
systems 
use 
• Control: 
freezing 
groups 
or 
checkpoin@ng 
and 
restar@ng. 
Tuesday, November 4, 14
Namespace 
• ParNNon 
essenNal 
kernel 
structures 
to 
create 
virtual 
environments 
• Different 
Namespaces 
– pid 
(processes) 
– net 
(network 
interfaces, 
rouNng...) 
– ipc 
(System 
V 
IPC) 
– mnt 
(mount 
points, 
filesystems) 
– uts 
(hostname) 
– user 
(UIDs) 
Tuesday, November 4, 14
Docker 
• Manages 
Images 
and 
Container 
runNmes 
• Supports 
mulNple 
file 
system 
back-­‐ends 
• MulNple 
Execdrivers 
for 
container 
implementaNon 
• Client 
and 
server 
components 
– 
interacNon 
using 
HTTP 
using 
unix 
sockets 
Tuesday, November 4, 14
Docker 
RunNme 
Components 
Tuesday, November 4, 14
Docker 
Engine 
• Core 
of 
Docker 
: 
Store 
for 
Containers 
• Manages 
containers 
using 
Jobs 
(similar 
to 
Unix 
jobs) 
• Contains 
Handlers 
a 
funcNon 
which 
wraps 
Jobs 
• All 
the 
acNons 
performed 
using 
Jobs 
Engine 
n 1 1 
1 Handler Job 
Tuesday, November 4, 14
Docker 
IniNalizaNon 
1. Main 
funcNon 
of 
Docker 
: 
docker.main() 
2. Calls 
: 
mainDaemon() 
3. InstanNate 
Engine 
eng := engine.New() 
4. 
Register 
built-­‐ins 
builtsin.Register(eng) 
5. 
InstanNate 
job 
job := eng.Job(“initserver”) 
6. 
Set 
Env 
variables 
for 
the 
Job 
Tuesday, November 4, 14
Docker 
IniNalizaNon 
5. Run 
the 
Job 
job.run() 
6. Start 
AccepNng 
ConnecNons 
eng.Job(“AcceptConnections”).run() 
Tuesday, November 4, 14
Docker 
IniNalizaNon 
: 
4 
4. 
Register 
built-­‐ins 
Instantiate daemon(eng) 
//see later slides for details 
eng.Register("initserver", server.InitServer) 
//see later slides for details 
eng.Register(“init_networkdriver”, bridge.InitDriver) 
Tuesday, November 4, 14
Daemon 
• Main 
Entry 
point 
for 
all 
the 
requests 
to 
manage 
containers 
• Data 
Structure 
which 
maintains 
following 
references 
– ImageGraph 
– Volume 
Graph 
– Engine 
– ExecDriver 
– Server 
– ContainerStore 
Tuesday, November 4, 14
Daemon 
-­‐ 
Graph 
• Graph 
is 
a 
(structure) 
store 
of 
versioned 
file 
system 
and 
rela@onship 
between 
images 
• For 
each 
container 
a 
Graph 
is 
instan@ated 
• References 
a 
graphdriver.Driver 
• Ac@ons 
on 
a 
Graph 
– Create 
a 
New 
Graph 
– Get 
image 
from 
a 
Graph 
– Restores 
a 
Graph 
– Creates 
an 
Image 
and 
Register 
in 
the 
Graph 
– Registers 
a 
pre-­‐exis@ng 
image 
on 
the 
Graph 
Tuesday, November 4, 14
Concept 
of 
Images 
and 
Containers 
in 
Docker 
• Docker 
image 
is 
a 
Layer 
in 
the 
file 
System 
• Containers 
are 
two 
Layers 
– Layer 
one 
is 
init 
layer 
based 
on 
Image 
– Layer 
two 
is 
the 
actual 
container 
content 
Container 
Content 
Image 
Content 
Layer 
Init 
Layer 
Docker 
Container 
Tuesday, November 4, 14
Container 
in 
Docker 
• DataStructure 
which 
resides 
in-­‐memory 
and 
is 
persisted 
in 
SQLite 
store 
• References 
other 
components 
like 
– Daemon 
– Volumes 
– Has 
a 
lifecycle 
which 
is 
controlled 
by 
Daemon 
– Daemon 
has 
in-­‐memory 
dicNonary 
of 
containerIDs 
and 
containers 
14 
Tuesday, November 4, 14
Lifecycle 
of 
a 
Container 
15 
Tuesday, November 4, 14
Graph 
Driver 
• Referenced 
by 
the 
Daemon 
• Used 
to 
abstract 
mulNple 
storage 
backends 
• Loads 
one 
of 
the 
following 
File 
System 
Backends 
– aufs 
– Device 
mapper 
(devmapper) 
– vfs 
– btrfs 
Tuesday, November 4, 14
Container 
store 
• Persistent 
backend 
for 
Container 
data 
• Implemented 
using 
SQLite 
• Referenced 
from 
Daemon 
containerGraph: graph 
Used 
to 
load 
container 
informaNon 
during 
Daemon 
restore 
Tuesday, November 4, 14
Volume 
Graph 
• Simple 
vfs 
based 
Graph 
to 
keep 
track 
of 
container 
volumes 
• Volumes 
used 
volume 
driver 
in 
Daemon 
to 
create 
and 
a?ach 
volumes 
to 
the 
container 
• Each 
container 
is 
associated 
with 
one 
of 
more 
volumes 
Tuesday, November 4, 14
ExecDriver 
• AbstracNon 
for 
the 
underlying 
Linux 
Containment 
• Called 
from 
the 
daemon 
• Supports 
following 
implementaNon 
– LXC 
– NaNve 
Tuesday, November 4, 14
Driver 
Interfaces 
• Abstract 
Interface 
to 
interact 
with 
the 
underlying 
implementaNon. 
type driver Interface{ 
Run(c *Command,..) 
Kill(c *Command) 
Pause(c *Command) 
Name() 
GetProcessIdsForContainer(id string) 
Terminate() 
} 
Tuesday, November 4, 14
Driver 
Interfaces 
-­‐ 
Networking 
• Abstract 
Interface 
to 
interact 
with 
the 
underlying 
implementaNon. 
type Network struct { 
Interface *NetworkInterface 
Mtu int 
ContainerID string 
HostNetworking bool 
} 
Tuesday, November 4, 14
libcontainer 
• Underlying 
naNve 
implementaNon 
of 
the 
Container 
• Used 
by 
the 
naNve 
driver 
• Container.config 
– 
representaNon 
of 
a 
container 
data 
• Wrapper 
over 
cgroups 
and 
Namespaces 
Tuesday, November 4, 14
NaNve 
Driver 
ImplementaNon 
Tuesday, November 4, 14
Steps 
in 
Container 
CreaNon 
Container 
Create 
Tuesday, November 4, 14
Container 
Commit 
Tuesday, November 4, 14
Summary 
• Linux 
Containment 
Principles 
• Docker 
Architectural 
components 
• NaNve 
Driver 
ImplementaNon 
– 
libcontainer 
• ContainerCreaNon 
Tuesday, November 4, 14

More Related Content

What's hot

Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker ComposeAjeet Singh Raina
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Docker introduction & benefits
Docker introduction & benefitsDocker introduction & benefits
Docker introduction & benefitsAmit Manwade
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationSuresh Kumar
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container SecuritySuraj Khetani
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes ArchitectureKnoldus Inc.
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To JenkinsKnoldus Inc.
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfKnoldus Inc.
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveLINE Corporation
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetesrajdeep
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demoOpsta
 
Docker Containers Deep Dive
Docker Containers Deep DiveDocker Containers Deep Dive
Docker Containers Deep DiveWill Kinard
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerInstruqt
 

What's hot (20)

Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker introduction & benefits
Docker introduction & benefitsDocker introduction & benefits
Docker introduction & benefits
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep Dive
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker Containers Deep Dive
Docker Containers Deep DiveDocker Containers Deep Dive
Docker Containers Deep Dive
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 

Similar to Docker Architecture (v1.3)

Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Lucas Jellema
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!Adrian Otto
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with DockerGeeta Vinnakota
 
Drupal 8 + Elasticsearch + Docker
Drupal 8 + Elasticsearch + DockerDrupal 8 + Elasticsearch + Docker
Drupal 8 + Elasticsearch + DockerRoald Umandal
 
Tech talk on docker with demo
Tech talk on docker with demoTech talk on docker with demo
Tech talk on docker with demoSandeep Karnawat
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWSAndrew Heifetz
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPivotalOpenSourceHub
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with DockerRavindu Fernando
 
VASCAN - Docker and Security
VASCAN - Docker and SecurityVASCAN - Docker and Security
VASCAN - Docker and SecurityMichael Irwin
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
Introduction to automated environment management with Docker Containers - for...
Introduction to automated environment management with Docker Containers - for...Introduction to automated environment management with Docker Containers - for...
Introduction to automated environment management with Docker Containers - for...Lucas Jellema
 
Ansible Oxford - Cows & Containers
Ansible Oxford - Cows & ContainersAnsible Oxford - Cows & Containers
Ansible Oxford - Cows & Containersjonatanblue
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerHiroki Endo
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupdotCloud
 

Similar to Docker Architecture (v1.3) (20)

Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
 
Java developer intro to environment management with vagrant puppet and docker
Java developer intro to environment management with vagrant puppet and dockerJava developer intro to environment management with vagrant puppet and docker
Java developer intro to environment management with vagrant puppet and docker
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Docker in OpenStack
Docker in OpenStackDocker in OpenStack
Docker in OpenStack
 
141204 upload
141204 upload141204 upload
141204 upload
 
Drupal 8 + Elasticsearch + Docker
Drupal 8 + Elasticsearch + DockerDrupal 8 + Elasticsearch + Docker
Drupal 8 + Elasticsearch + Docker
 
Tech talk on docker with demo
Tech talk on docker with demoTech talk on docker with demo
Tech talk on docker with demo
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWS
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh Shah
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
VASCAN - Docker and Security
VASCAN - Docker and SecurityVASCAN - Docker and Security
VASCAN - Docker and Security
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
 
Docker Dojo
Docker DojoDocker Dojo
Docker Dojo
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Introduction to automated environment management with Docker Containers - for...
Introduction to automated environment management with Docker Containers - for...Introduction to automated environment management with Docker Containers - for...
Introduction to automated environment management with Docker Containers - for...
 
Ansible Oxford - Cows & Containers
Ansible Oxford - Cows & ContainersAnsible Oxford - Cows & Containers
Ansible Oxford - Cows & Containers
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker Meetup
 

More from rajdeep

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overviewrajdeep
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5rajdeep
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introductionrajdeep
 
Openstack Overview
Openstack OverviewOpenstack Overview
Openstack Overviewrajdeep
 
VMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - OverviewVMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - Overviewrajdeep
 
Cloudfoundry Overview
Cloudfoundry OverviewCloudfoundry Overview
Cloudfoundry Overviewrajdeep
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
Openstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overviewOpenstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overviewrajdeep
 
Deploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstrapDeploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstraprajdeep
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstackrajdeep
 
Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overviewrajdeep
 
Cloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , KeynoteCloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , Keynoterajdeep
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundryrajdeep
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platformrajdeep
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Enginerajdeep
 

More from rajdeep (15)

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overview
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Openstack Overview
Openstack OverviewOpenstack Overview
Openstack Overview
 
VMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - OverviewVMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - Overview
 
Cloudfoundry Overview
Cloudfoundry OverviewCloudfoundry Overview
Cloudfoundry Overview
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
Openstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overviewOpenstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overview
 
Deploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstrapDeploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstrap
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstack
 
Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overview
 
Cloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , KeynoteCloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , Keynote
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Docker Architecture (v1.3)

  • 1. Docker Architecture based on v 1.3 Compiled by Rajdeep Dua Twi?er : @rajdeepdua Oct 2014 Tuesday, November 4, 14
  • 2. Before we get started • What is a Container? – Group of processes contained in a Isolated Environment – IsolaNon provided by Concepts like cgroups and namespaces • What is Docker? – ImplementaNon of a container which is portable using a concept of image. Tuesday, November 4, 14
  • 3. CGroup • Limit, account, and isolate resource usage (CPU, memory, disk I/O, etc.) of process groups. • Resource limi@ng: groups can be set to not exceed a set memory limit — this also includes file system cache. • Priori@za@on: some groups may get a larger share of CPU[8] or disk I/O throughput. • Accoun@ng: to measure how much resources certain systems use • Control: freezing groups or checkpoin@ng and restar@ng. Tuesday, November 4, 14
  • 4. Namespace • ParNNon essenNal kernel structures to create virtual environments • Different Namespaces – pid (processes) – net (network interfaces, rouNng...) – ipc (System V IPC) – mnt (mount points, filesystems) – uts (hostname) – user (UIDs) Tuesday, November 4, 14
  • 5. Docker • Manages Images and Container runNmes • Supports mulNple file system back-­‐ends • MulNple Execdrivers for container implementaNon • Client and server components – interacNon using HTTP using unix sockets Tuesday, November 4, 14
  • 6. Docker RunNme Components Tuesday, November 4, 14
  • 7. Docker Engine • Core of Docker : Store for Containers • Manages containers using Jobs (similar to Unix jobs) • Contains Handlers a funcNon which wraps Jobs • All the acNons performed using Jobs Engine n 1 1 1 Handler Job Tuesday, November 4, 14
  • 8. Docker IniNalizaNon 1. Main funcNon of Docker : docker.main() 2. Calls : mainDaemon() 3. InstanNate Engine eng := engine.New() 4. Register built-­‐ins builtsin.Register(eng) 5. InstanNate job job := eng.Job(“initserver”) 6. Set Env variables for the Job Tuesday, November 4, 14
  • 9. Docker IniNalizaNon 5. Run the Job job.run() 6. Start AccepNng ConnecNons eng.Job(“AcceptConnections”).run() Tuesday, November 4, 14
  • 10. Docker IniNalizaNon : 4 4. Register built-­‐ins Instantiate daemon(eng) //see later slides for details eng.Register("initserver", server.InitServer) //see later slides for details eng.Register(“init_networkdriver”, bridge.InitDriver) Tuesday, November 4, 14
  • 11. Daemon • Main Entry point for all the requests to manage containers • Data Structure which maintains following references – ImageGraph – Volume Graph – Engine – ExecDriver – Server – ContainerStore Tuesday, November 4, 14
  • 12. Daemon -­‐ Graph • Graph is a (structure) store of versioned file system and rela@onship between images • For each container a Graph is instan@ated • References a graphdriver.Driver • Ac@ons on a Graph – Create a New Graph – Get image from a Graph – Restores a Graph – Creates an Image and Register in the Graph – Registers a pre-­‐exis@ng image on the Graph Tuesday, November 4, 14
  • 13. Concept of Images and Containers in Docker • Docker image is a Layer in the file System • Containers are two Layers – Layer one is init layer based on Image – Layer two is the actual container content Container Content Image Content Layer Init Layer Docker Container Tuesday, November 4, 14
  • 14. Container in Docker • DataStructure which resides in-­‐memory and is persisted in SQLite store • References other components like – Daemon – Volumes – Has a lifecycle which is controlled by Daemon – Daemon has in-­‐memory dicNonary of containerIDs and containers 14 Tuesday, November 4, 14
  • 15. Lifecycle of a Container 15 Tuesday, November 4, 14
  • 16. Graph Driver • Referenced by the Daemon • Used to abstract mulNple storage backends • Loads one of the following File System Backends – aufs – Device mapper (devmapper) – vfs – btrfs Tuesday, November 4, 14
  • 17. Container store • Persistent backend for Container data • Implemented using SQLite • Referenced from Daemon containerGraph: graph Used to load container informaNon during Daemon restore Tuesday, November 4, 14
  • 18. Volume Graph • Simple vfs based Graph to keep track of container volumes • Volumes used volume driver in Daemon to create and a?ach volumes to the container • Each container is associated with one of more volumes Tuesday, November 4, 14
  • 19. ExecDriver • AbstracNon for the underlying Linux Containment • Called from the daemon • Supports following implementaNon – LXC – NaNve Tuesday, November 4, 14
  • 20. Driver Interfaces • Abstract Interface to interact with the underlying implementaNon. type driver Interface{ Run(c *Command,..) Kill(c *Command) Pause(c *Command) Name() GetProcessIdsForContainer(id string) Terminate() } Tuesday, November 4, 14
  • 21. Driver Interfaces -­‐ Networking • Abstract Interface to interact with the underlying implementaNon. type Network struct { Interface *NetworkInterface Mtu int ContainerID string HostNetworking bool } Tuesday, November 4, 14
  • 22. libcontainer • Underlying naNve implementaNon of the Container • Used by the naNve driver • Container.config – representaNon of a container data • Wrapper over cgroups and Namespaces Tuesday, November 4, 14
  • 23. NaNve Driver ImplementaNon Tuesday, November 4, 14
  • 24. Steps in Container CreaNon Container Create Tuesday, November 4, 14
  • 25. Container Commit Tuesday, November 4, 14
  • 26. Summary • Linux Containment Principles • Docker Architectural components • NaNve Driver ImplementaNon – libcontainer • ContainerCreaNon Tuesday, November 4, 14