SlideShare a Scribd company logo
Introduction	to	Docker
Peng Xiao
GitHub: xiaopeng163
Network Consulting Engineer
Cisco Systems
Contents
• The Metrix from Hell
• What is Container/Docker?
• Docker Basic Usage
• Docker Networking Deep Dive
• Docker Compose
• Docker Swarm
• Ecosystem and Standardization
Static website
Web frontend
User DB
Queue Analytics DB
Background workers
API endpoint
nginx 1.5 + modsecurity + openssl + bootstrap 2
postgresql + pgv8 + v8
hadoop + hive + thrift + OpenJDK
Ruby + Rails + sass + Unicorn
Redis + redis-sentinel
Python 3.0 + celery + pyredis + libcurl + ffmpeg + libopencv + nodejs +
phantomjs
Python 2.7 + Flask + pyredis + celery + psycopg + postgresql-client
DevelopmentVM
QA server
Public Cloud
Disaster recovery
Contributor’s laptop
Production Servers
The	ChallengeMultiplicity	of	Stacks
Multiplicity	of	
hardware	
environments
Production Cluster
Customer Data Center
Do	services	and	apps	
interact	
appropriately?
Can	I	migrate	
smoothly	and	
quickly?
The	Matrix	From	Hell
Static website
Web frontend
Background workers
User DB
Analytics DB
Queue
Developmen
t VM
QA Server
Single Prod
Server
Onsite
Cluster
Public Cloud
Contributor’
s laptop
Customer
Servers
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
Static website Web frontendUser DB Queue Analytics DB
Development
VM
QA server Public Cloud Contributor’s
laptop
Docker	is	a	shipping	container	system	for	code	Multiplicity	of	Stacks
Multiplicity	of	
hardware	
environments
Production
Cluster
Customer Data
Center
Do	services	and	apps	
interact	
appropriately?
Can	I	migrate	
smoothly	and	quickly
…that can be manipulated using
standard operations and run
consistently on virtually any
hardware platform
An engine that enables any
payload to be encapsulated
as a lightweight, portable,
self-sufficient container…
Static website
Web frontend
Background workers
User DB
Analytics DB
Queue
Developmen
t VM
QA Server
Single Prod
Server
Onsite
Cluster
Public Cloud
Contributor’
s laptop
Customer
Servers
Docker	eliminates	the	matrix	from	Hell
Why	Developers	Care
• Build	once…(finally)	run	anywhere*
• A	clean,	safe,	hygienic	and	portable	runtime	environment	for	your	app.
• No	worries	about	missing	dependencies,	packages	and	other	pain	points	during	subsequent	
deployments.
• Run	each	app	in	its	own	isolated	container,		so	you	can	run	various	versions	of	libraries	and	other	
dependencies	for	each	app	without	worrying
• Automate	testing,	integration,	packaging…anything	you	can	script	
• Reduce/eliminate	concerns	about	compatibility	on	different	platforms,	either	your	own	or	your	
customers.	
• Cheap,	zero-penalty	containers	to	deploy	services?	A	VM	without	the	overhead	of	a	VM?	Instant	
replay	and	reset	of	image	snapshots?	That’s	the	power	of	Docker
*	With	the	0.7	release,	we	support	any	x86	server	running	a	modern	Linux	kernel	(3.2+	generally.	2.6.32+	for	RHEL	6.5+,	Fedora,	&	
related)
Why	Devops Cares?
• Configure	once…run	anything
• Make	the	entire	lifecycle	more	efficient,	consistent,	and	repeatable
• Increase	the	quality	of	code	produced	by	developers.	
• Eliminate	inconsistencies	between	development,	test,	production,	and	customer	environments
• Support	segregation	of	duties
• Significantly	improves	the	speed	and	reliability	of	continuous	deployment	and	continuous	
integration	systems
• Because	the	containers	are	so	lightweight,	address	significant	performance,	costs,	deployment,	and	
portability	issues	normally	associated	with	VMs
Contents
• The Metrix from Hell
•What is Container/Docker?
• Docker Basic Usage
• Docker Networking Deep Dive
• Docker Compose
• Docker Swarm
• Ecosystem and Standardization
Container History
http://kiwenlau.blogspot.com/2015/01/linux-container-technology-overview.html
Docker is nothing new, it just show in the right time
App
A
Containers	vs.	VMs	
Hypervisor	(Type	2)
Host	OS
Server
Guest
OS
Bins/
Libs
App
A’
Guest
OS
Bins/
Libs
App
B
Guest
OS
Bins/
Libs
App	A’
Docker
Host	OS
Server
Bins/Libs
App	A
Bins/Libs
App	B
App	B’
App	B’
App	B’
VM
Container
Containers	are	isolated,
but	share	OS	and,	where
appropriate,	bins/libraries
Guest
OS
Guest
OS
…result	is	significantly	faster	deployment,		
much	less	overhead,	easier	migration,	
faster	restart
Why	are	Containers	lightweight?
Bins/
Libs
App
A
Original	App
(No	OS	to	take
up	space,	resources,
or	require	restart)
App	Δ
Bins/
App
A
Bins/
Libs
App
A’
Guest
OS
Bins/
Libs
Modified	App
Copy	on	write	
capabilities	allow
us	to	only	save	the	diffs
Between	container	A	
and	container
A’
VMs
Every	app,	every	copy	of	an
app,	and	every	slight	modification
of	the	app	requires	a	new	virtual	server
App
A
Guest
OS
Bins/
Libs
Copy	of
App
No	OS.	Can
Share	bins/libs
App
A
Guest
OS
Guest
OS
VMs Containers
Docker Inside
Docker Inside (Deep Dive)
• A	Deep	Dive	Into	Linux	Containers	For	Engineers	Interested	In	The	
Gritty	Details. http://docker-saigon.github.io/post/Docker-Internals/
• Cgroups,	namespaces,	and	beyond:	what	are	containers	made	from?	
(DockerCon Europe	2015) https://goo.gl/25KtpZ
Contents
• The Metrix from Hell
• What is Container/Docker?
•Docker Basic Usage
• Docker Networking Deep Dive
• Docker Compose
• Docker Swarm
• Ecosystem and Standardization
Docker	Engine
• Docker	Daemon	+	REST(ish)	API
• Docker	Client	(CLI)	talks	to	the	API
• Daemon	manages	the	Docker	containers
• Start	it	with:	docker –d
• docker version	to	test	if	docker is	setup	correctly
• Docker	Engine	(Linux,	Mac,	Windows)
• https://docs.docker.com/engine/installation/
Docker	Toolbox
• Docker	Toolbox	is	an	installer	for	quick	setup	and	launch	of	a	Docker	
environment	on	older	Mac	and	Windows	systems	that	do	not	meet	
the	requirements	of	the	new	Docker	for	Mac	and	Docker	for	Windows	
apps.
Docker	Machine
• Machine	makes	it	really	easy	to	create	Docker	hosts	on	your	computer,	on	
cloud	providers	and	inside	your	own	data	center.	It	creates	servers,	installs	
Docker	on	them,	then	configures	the	Docker	client	to	talk	to	them.
• Drivers	exist	for:
• AWS
• DigitalOcean
• Azure
• Google	Compute	Engine
• Rackspace
• OpenStack
• Virtualbox
• VMWare	Fusion
• VMWare	vSphere
• Hyperv
Docker Images	vs	Containers
• Images:	About	storing	or	moving	your	app
• Containers:	About	running	your	app
https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/
Docker Workflow——Build/Pull/Push
Source	
Code	
Repository
Dockerfile
For	
A
Docker	Engine
Docker
Container
Image	
Registry
Build
Docker	
Host	2	OS		(Linux)
Container	A
Container	B
Container	C
Container	A
Push
Search
Pull
Run
Host	1		OS	(Linux)
Docker	Image
• Download,	list,	remove	images
https://hub.docker.com/
Dockerfile
Create a Dockerfile
Build a image
https://docs.docker.com/engine/reference/builder/
Docker	Container
• Create and start a container
• Inside of the container
Docker	Container
• Stop and remove a container
http://docker-k8s-lab.readthedocs.io/en/latest/docker/docker-cli.html
Contents
• The Metrix from Hell
• What is Container/Docker?
• Docker Basic Usage
•Docker Networking Deep Dive
• Docker Compose
• Docker Swarm
• Ecosystem and Standardization
Docker Networking
Container	Network	Model
https://github.com/docker/libnetwork/blob/master/docs/design.md
CNM Drivers
Demo: Docker Bridge Network
• http://docker-k8s-lab.readthedocs.io/en/latest/docker/bridged-
network.html
Docker Multi-Host Networking
• Tunnel
• Docker build-in overlay network: VXLAN
• OVS: VXLAN or GRE
• Flannel: VXLAN or UDP
• Weave: VXLAN or UDP
• Routing
• Calico: Layer 3 routing based on BGP
• Contiv: Layer 3 routing based on BGP
http://blog.dataman-inc.com/shurenyun-docker-133/
Lab A: Overlay Multi-Host Networking with OVS
• http://docker-k8s-lab.readthedocs.io/en/latest/docker/docker-
ovs.html
Linux bridge
docker0
br-int gre0
eth0
eth0 eth0
Host 1
Docker
Container 2Container 1
Open vSwitch
Linux bridge
docker0
br-intgre0
eth0
eth0 eth0
Host 2
Docker
Container 2Container 1
Open vSwitch
GRE tunnel
Lab B:Multi-Host Overlay	Networking	with	Etcd
• http://docker-k8s-lab.readthedocs.io/en/latest/docker/docker-
etcd.html
Docker	1.12	Networking	Model	Overview
Contents
• The Metrix from Hell
• What is Container/Docker?
• Docker Basic Usage
• Docker Networking Deep Dive
•Docker Compose
• Docker Swarm
• Ecosystem and Standardization
Docker	Compose	Overview
• Compose	is	a	tool	for	defining	and	running	multi-container	Docker	applications.	
With	Compose,	you	use	a	Compose	file	to	configure	your	application’s	services.	
Then,	using	a	single	command,	you	create	and	start	all	the	services	from	your	
configuration.
• Defined	in	yaml
Demo: Docker Compose
• Example	Voting	App
• https://github.com/DaoCloud/example-voting-app
• Guide:
• http://docker-k8s-lab.readthedocs.io/en/latest/docker/docker-compose.html
Contents
• The Metrix from Hell
• What is Container/Docker?
• Docker Basic Usage
• Docker Networking Deep Dive
• Docker Compose
•Docker Swarm
• Ecosystem and Standardization
Before Docker Swarm
With Docker Swarm
grpc
raft	consensus	group
gossip	network
http://www.grpc.io/
http://thesecretlivesofdata.com/raft/
https://en.wikipedia.org/wiki/Gossip_protocol
Docker Orchestration Components
http://www.slideshare.net/ajeetraina/service-discovery-loadbalancing-under-docker-1120-docker-meetup-22
Create Docker Service
https://www.youtube.com/watch?v=_F6PSP-qhdA
http://collabnix.com/archives/1445
Demo: Docker Swarm
• Docker Swarm with Load Balancing and Scaling
• http://docker-k8s-lab.readthedocs.io/en/latest/docker/docker-swarm-lb-
scale.html
• Multi-Services issue
• https://github.com/docker/compose/issues/3656
Contents
• The Metrix from Hell
• What is Container/Docker?
• Docker Basic Usage
• Docker Networking Deep Dive
• Docker Compose
• Docker Swarm
•Ecosystem and Standardization
Container Ecosystem
Open	Container	Initiative (OCI)
• A Linux Foundation Collaborative Project
• Free from control by any particular vendor’s specfic cloud stack or
ecosystem
• Includes:
• Container runtime specification -> runc
• Image format specification
http://www.slideshare.net/PhilEstes/runc-the-little-engine-that-could-run-docker-containers
https://www.opencontainers.org/
https://github.com/opencontainers
Container Networking
• Container Network Model (CNM) by Docker
• Adopted by Docker libnetwork, Cisco Contiv, Kuryr, OVN, Project Calico,
Vmware, Vwave
• Container Network Interface(CNI) by CoreOS
• Adopted by kuberntes, Kurma, rkt, Apache Mesos, Clould Foundry, Cisco
Contiv, Project Calico and Weave.
http://thenewstack.io/container-networking-landscape-cni-coreos-cnm-docker/
https://github.com/containernetworking
?

More Related Content

PPTX
Introduction to Docker - 2017
PDF
Docker 101: Introduction to Docker
PPTX
Docker Basics
PDF
Introduction to Docker
PPTX
Getting started with Docker
PDF
Introduction to docker
PDF
Kubernetes Basics
PPTX
Docker introduction
Introduction to Docker - 2017
Docker 101: Introduction to Docker
Docker Basics
Introduction to Docker
Getting started with Docker
Introduction to docker
Kubernetes Basics
Docker introduction

What's hot (20)

PPTX
Introduction to Docker
PPTX
Docker introduction for the beginners
PPTX
Docker 101 : Introduction to Docker and Containers
PPTX
Docker introduction & benefits
PPTX
Docker introduction (1)
PPTX
Docker: From Zero to Hero
PDF
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
PPTX
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
PDF
How to write a Dockerfile
PPTX
Docker 101 - Nov 2016
PPT
presentation on Docker
PPTX
Docker and kubernetes
PPTX
What is Docker
PDF
Dockerfile
PDF
Introduction to Docker - VIT Campus
PDF
Introduction to Docker
PDF
Kubernetes
PPTX
Docker intro
PDF
Introduction to container based virtualization with docker
Introduction to Docker
Docker introduction for the beginners
Docker 101 : Introduction to Docker and Containers
Docker introduction & benefits
Docker introduction (1)
Docker: From Zero to Hero
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
How to write a Dockerfile
Docker 101 - Nov 2016
presentation on Docker
Docker and kubernetes
What is Docker
Dockerfile
Introduction to Docker - VIT Campus
Introduction to Docker
Kubernetes
Docker intro
Introduction to container based virtualization with docker
Ad

Viewers also liked (20)

PDF
Introduction To Docker
PDF
containerd and CRI
PDF
Driving containerd operations with gRPC
PPTX
Docker Online Meetup: Announcing Docker CE + EE
PPTX
Introduction Into Docker Ecosystem
PDF
[DockerHN_2nd_meetup] Ecosystem & Orchestration Tools
PDF
AWS Elastic Container Service - DockerHN
PDF
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
PDF
Easy applications deployment on OpenStack clouds
PDF
From zero to Docker
PPTX
Docker, From zero to hero
PDF
PDF
Dockers zero to hero - (medium version)
PDF
Docker: from zero to nonzero
PDF
Docker Orchestrators
PDF
Rabbit mq messaginginthecloud_v_mworld_2010_ms
PPTX
Introduction to Docker
PPSX
From Zero to Hero - Nexinto
PDF
Docker 101 - from 0 to Docker in 30 minutes
PDF
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
Introduction To Docker
containerd and CRI
Driving containerd operations with gRPC
Docker Online Meetup: Announcing Docker CE + EE
Introduction Into Docker Ecosystem
[DockerHN_2nd_meetup] Ecosystem & Orchestration Tools
AWS Elastic Container Service - DockerHN
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Easy applications deployment on OpenStack clouds
From zero to Docker
Docker, From zero to hero
Dockers zero to hero - (medium version)
Docker: from zero to nonzero
Docker Orchestrators
Rabbit mq messaginginthecloud_v_mworld_2010_ms
Introduction to Docker
From Zero to Hero - Nexinto
Docker 101 - from 0 to Docker in 30 minutes
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
Ad

Similar to Docker Introduction (20)

PDF
Docker Introduction
PPTX
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
PPTX
OpenStack Summit
PPTX
Dockerize the World
PPTX
Docker - Portable Deployment
PPTX
DockerCon EU 2015 Barcelona
PPTX
ma-formation-en-Docker-jlklk,nknkjn.pptx
PPTX
Dockerize the World - presentation from Hradec Kralove
PPTX
Docker-Intro
PPTX
Intro Docker october 2013
PPTX
Intro to Docker November 2013
PPTX
Intro to Docker October 2013
PPTX
Docker intro
PDF
Docker for dev
PDF
Docker slides
PDF
Introduction to Docker | Docker and Kubernetes Training
PDF
Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net T...
PDF
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
PPT
Docker, a new LINUX container technology based light weight virtualization
Docker Introduction
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
OpenStack Summit
Dockerize the World
Docker - Portable Deployment
DockerCon EU 2015 Barcelona
ma-formation-en-Docker-jlklk,nknkjn.pptx
Dockerize the World - presentation from Hradec Kralove
Docker-Intro
Intro Docker october 2013
Intro to Docker November 2013
Intro to Docker October 2013
Docker intro
Docker for dev
Docker slides
Introduction to Docker | Docker and Kubernetes Training
Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net T...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
Docker, a new LINUX container technology based light weight virtualization

Recently uploaded (20)

PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PDF
REPORT: Heating appliances market in Poland 2024
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
Top Generative AI Tools for Patent Drafting in 2025.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Smarter Business Operations Powered by IoT Remote Monitoring
PPTX
Belt and Road Supply Chain Finance Blockchain Solution
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 2 Digital Image Fundamentals.pdf
creating-agentic-ai-solutions-leveraging-aws.pdf
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
REPORT: Heating appliances market in Poland 2024
Chapter 3 Spatial Domain Image Processing.pdf
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
CroxyProxy Instagram Access id login.pptx
Top Generative AI Tools for Patent Drafting in 2025.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
GamePlan Trading System Review: Professional Trader's Honest Take
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Smarter Business Operations Powered by IoT Remote Monitoring
Belt and Road Supply Chain Finance Blockchain Solution
NewMind AI Monthly Chronicles - July 2025
Chapter 2 Digital Image Fundamentals.pdf

Docker Introduction