SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya Konarde
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationSuresh Kumar
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginnersJuneyoung Oh
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Containerization and Docker
Containerization and DockerContainerization and Docker
Containerization and DockerMegha Bansal
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Midi technique - présentation docker
Midi technique - présentation dockerMidi technique - présentation docker
Midi technique - présentation dockerOlivier Eeckhoutte
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction Robert Reiz
 

Tendances (20)

Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
 
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
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Containerization and Docker
Containerization and DockerContainerization and Docker
Containerization and Docker
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker internals
Docker internalsDocker internals
Docker internals
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker
DockerDocker
Docker
 
Midi technique - présentation docker
Midi technique - présentation dockerMidi technique - présentation docker
Midi technique - présentation docker
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 

Similaire à 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
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
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
 

Similaire à 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
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
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
 

Plus de 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
 

Plus de 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
 

Dernier

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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Dernier (20)

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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

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