SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Docker intro
Docker introDocker intro
Docker introOleg Z
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersYajushi Srivastava
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with DockerRavindu Fernando
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesabhishek chawla
 
1. Docker Introduction.pdf
1. Docker Introduction.pdf1. Docker Introduction.pdf
1. Docker Introduction.pdfAmarGautam15
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 
What is Docker Architecture | Edureka
What is Docker Architecture | EdurekaWhat is Docker Architecture | Edureka
What is Docker Architecture | EdurekaEdureka!
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
Why Docker
Why DockerWhy Docker
Why DockerdotCloud
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersKernel TLV
 

Was ist angesagt? (20)

Docker intro
Docker introDocker intro
Docker intro
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Docker architecture-04-1
Docker architecture-04-1Docker architecture-04-1
Docker architecture-04-1
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management services
 
1. Docker Introduction.pdf
1. Docker Introduction.pdf1. Docker Introduction.pdf
1. Docker Introduction.pdf
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker
DockerDocker
Docker
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Docker internals
Docker internalsDocker internals
Docker internals
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
What is Docker Architecture | Edureka
What is Docker Architecture | EdurekaWhat is Docker Architecture | Edureka
What is Docker Architecture | Edureka
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Why Docker
Why DockerWhy Docker
Why Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containers
 

Ähnlich wie 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
 
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
 
Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1Docker, Inc.
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupdotCloud
 

Ähnlich wie 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
 
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
 
Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker Meetup
 

Mehr von rajdeep

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overviewrajdeep
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5rajdeep
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetesrajdeep
 
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
 

Mehr von rajdeep (15)

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overview
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
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
 

Kürzlich hochgeladen

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 

Kürzlich hochgeladen (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 

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