SlideShare a Scribd company logo
Docker Training
liangbo@trystack.cn
Docker Introduction & WORKSHOP
COURSE INTRODUCTION
DAY 01
• Docker Introduction
• Installation of Docker
• Working with Containers
• Working with Images
• Building image with Dockerfiles
• OpenStack Integration
• OpenStack Introduction
• Nova Driver (Docker as Compute
Service)
• Glance as Docker image registry
DAY 02
• Docker Cluster
• Kubernetes Introduction
• Docker Networking
• Docker Hub
• Docker Cases
• Docker Source Code
• Development Platform With
Docker
• Hadoop on Docker
8 n , D r
S OcM k8 l
o n O e n gtu
e S p 8 o
a G P 8y
h
liangbo@trystack.cn
http://github.com/onetown
http://liangbo.me
Infrastructure 90%
Storage, Network, Virtualization ,Container 40%
Front-end, HTML, CSS, Javascript 60%
Python, C Sharp, Go-lang Development 90%Liang Bo (TRYSTACK.CN )
Docker Introduction
Docker For Beginners
Docker is an open platform for developers and sysadmins tobuild, ship, and run distributed applications.Consisting ofDocker Engine, a portable, lightweight runtime and
packaging tool, and Docker Hub, a cloudservice for sharing applications and automating workflows,Docker enables apps tobe quickly assembledfrom components and
eliminates the frictionbetweendevelopment,QA, and production environments. As a result,IT can ship faster and run the same app,unchanged,on laptops, data center VMs,
and any cloud.
03
Looking for Something Specific
Develop, Ship and Runany application,anywhere
04
Looking for Help
https://docs.docker.com
02
Learning
Docker consists of:
The Docker Engine - our lightweight and powerful open source container
virtualization technology combined witha work flow for building and
containerizing your applications.
Docker Hub - our SaaS service for sharing and managing your application
stacks.
01
Installation
Docker requires a 64-bit installation regardless of your Linux
version. Additionally, your kernel must be 3.10 at minimum. The
latest 3.10 minor versionor a newer maintained version are also
acceptable.
The$Challenge
Static website
Web frontend
User DB
Queue Analytics DB
Backgroundworkers
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
Development VM
QA server
PublicCloud
Disaster recovery
Contributor’slaptop
ProductionServers
MultiplicityofStacks
Multiplicityof
hardware
environments
ProductionCluster
CustomerData Center
Doservicesandapps
interactappropriately?
CanImigratesmoothly
andquickly?
Application$Matrix
Static website
Web frontend
Background workers
User DB
Analytics DB
Queue
Development VM QA Server Single Prod Server Onsite Cluster Public Cloud Contributor’s laptop Customer Servers
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
Explanation
• High Level—It’s a lightweight VM
• Own process space
• Own network interface
• Can run stuff asroot
• Can have itsown/sbin/init (different from
host)
• <<machine container>>
• Low Level—It’s chroot on steroids
• Can alsonot have itsown/sbin/init
• Container=isolatedprocesses
• Share kernelwithhost
• Nodevice emulation (neither HVM nor PV)
fromhost)
• <<application container>>
• Runeverywhere
• Regardless of kernel version (2.6.32+)
• Regardless of host distro
• Physical or virtual, cloudor not
• Containerand host architecturemust
match*
• Run anything
• If it can run onthe host,it canrun in the
container
• i.e. if it can run ona Linuxkernel, it can run
WHY WHAT
Introduction
• Docker is an open-sourceengine that automatesthe deployment of any application as a
lightweight, portable, self-sufficient container that will runvirtually anywhere.
• Based onLXC (Linux Container), easy to use.
• Similar to VM asend-user with different features.
• Founded in 2013 (dotCloud)
• Joined Linux Foundation
• Apache 2.0 License
• Implemented by Golang
Virtual$Machine
Docker
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 onwritecapabilities
allow
us to onlysave the diffs
Between container A and
container
A’
VMs
Every app, every copy ofan
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
Basic$Docker System
Source Code
Repository
Dockerfile
For
A
Docker Engine
Docker
Container
Image
Registry
Build
Docker
Host 2 OS (Linux)
ContainerA
ContainerB
ContainerC
ContainerA
Push
Search
Pull
Run
Host 1 OS (Linux)
Changes$and$Updates
Docker Engine
Docker
Container
Image
Registry
Docker Engine
Push
Update
Bins/
Libs
App
A
AppΔ
Bins/
Base
Container
Image
Host is now runningA’’
Container Mod
A’’
AppΔ
Bins/
Bins/
Libs
App
A
Bins/
Bins/
Libs
App
A’’
Host runningA wantsto upgradetoA’’. Requests
update.Gets only diffs
Container Mod
A’
Ecosystem
• Operatingsystems
• Virtually anydistribution with a 2.6.32+ kernel
• Red Hat/Docker collaboration to makework acrossRHEL 6.4+, Fedora, and other membersof thefamily (2.6.32 +)
• CoreOS—Small coreOS purposebuilt with Docker
• OpenStack
• Docker integration into NOVA(& compatibility with Glance, Horizon, etc.) accepted for Havana release
• Private PaaS
• OpenShift
• Solum (Rackspace, OpenStack)
• Public PaaS
• Deis, Voxoz, Cocaine (Yandex), Baidu PaaS
• Public IaaS
• Native support in Rackspace, Digital Ocean,+++
• AMI (or equivalent) available for AWS & other
• DevOps Tools
• Integrationswith Chef, Puppet, Jenkins, Travis, Salt, Ansible+++
• Orchestration tools
• Mesos, Heat, ++
• Shipyard &otherspurposebuilt for Docker
• Applications
• 1000’s of Dockerized applications available at index.docker.io
Working with Container
!
Docker module 1
Native$Driver
Docker module 1
Driver$Interface
• Abstract(Interface(to(interact(with(the(underlying(implementation
type(driver(Interface({
Run((c(*Command,(…)
Kill((c(*(Command)
Pause((c(*Command)
Name()
GetProcessIdsForContainer (id(string)
Terminate(()
}
Run Docker ?
$ sudo docker run ubuntu:14.04 /bin/echo 'Hello world’
Hello world
sudo docker run -t -i ubuntu:14.04 /bin/bash
root@73a19a637b54:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp
usr var
Installation
!
Ubuntu 14.04
$ sudo apt-get update
$ sudo apt-get install –y docker.io
$ sudo ln –sf /usr/bin/docker.io/usr/local/bin/docker
$ sudo sed –I ‘$acomplete –F _docker docker’ /etc/bash_completion.d/docker.io
Ubuntu 14.04 – Docker Official Release (New)
$ sudo apt-key adv –keyserverhkp://keyserver.ubuntu.com:80 –recv-keys36A1D7869245C895
$ sudo bash –c “echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get installlxc-docker
Working with Image
!
Get Image
$ sudo docker pull ubuntu:14.04
Pullingrepositoryubuntu
07f8e8c5e660:Downloadcomplete
e9e06b06e14c: Downloadcomplete
a82efea989f9: Downloadcomplete
37bea4ee0c81: Downloadcomplete
Get Image From Specific Server
$ sudo docker pull dl.dockerpool.com:5000 ubuntu:14.04
Pullingrepositoryubuntu
07f8e8c5e660:Downloadcomplete
e9e06b06e14c: Downloadcomplete
a82efea989f9: Downloadcomplete
37bea4ee0c81: Downloadcomplete
List Images
$ sudo docker images
REPOSITORY TAG IMAGEID CREATED VIRTUAL SIZE
ubuntu 14.04 07f8e8c5e660 2weeks ago 188.3MB
OpenStack Integration
!
Docker module 1
OpenStack Introduction
!
What$is$OpenStack
“Open%source software*for*building
private%and%public%clouds”
33OpenStack*Foundation
OpenStack$Projects
• Core Projects
• Nova(Compute Service)
• Glance (Image Service)
• Neutron (Network Service)
• Cinder (Block StorageService)
• Swift (Object StorageService)
• Common Projects
• Keystone (Identity Service)
• Horizon (Dashboard)
• Ceilometer (Telemeter Service)
• Heat (Orchestration Service)
• Shared Modules
• Oslo (Shared Infrastructure Code)
• Incubation Projects
• Magnum (Container Service)
OpenStack$Project
• Eachproject is a “top-level” OpenStack part
• Eachproject has a “Project TechnicalLeader” (PTL)
• Eachproject has different developers and designers
• Eachproject has well designed public API
• Except Horizon, it’s a WEB UI
• Allother project providea RESTful API(JSON/HTTP)
• Eachproject has isolated database
OpenStack$Project
OpenStack$Classic$Deployment
OpenStack$Communication
UI:%Horizon%/%CLI
Cinder%API
Scheduler
Cinder%DB
Queue
Cinder
Cinder%Vol
Nova%API
Scheduler
Conductor
Nova%Cell
Queue
Nova%DB
Nova
Nova
Nova@Compute
Nova
Hyperviso
r
Compute/Node
VM
Network
Router/GW
DHCP/IPAM
Network/Node
Storage
Block/
Storage/Node
Glance%API
Glance%Registry
Glance%DB
Glance
Proxy%Server
Object%Store
Swift
Plugin% /Agent
Neutron%DB
Neutron%Server
Neutron
Plugin%/Agent
Keystone%Server
Keystone%DB
Keystone
Compute$Scheduler
Compute$Driver
Container
Container
Container
Docker
Demo - Nova Driver – (Docker as compute
Service)
!
Demo - Glance as Docker Image Registry
!
Questions?

More Related Content

What's hot (20)

PDF
Learning Docker with Thomas
Thomas Tong, FRM, PMP
 
PDF
Docker
Chen Chun
 
PDF
Introduction To Docker
Hamilton Turner
 
PDF
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
PDF
Introduction to Docker
Jian Wu
 
PPTX
Docker introduction
dotCloud
 
PDF
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
PDF
Basic docker for developer
Weerayut Hongsa
 
PDF
Docker - introduction
Michał Kurzeja
 
PPTX
Docker Introduction
Hao Fan
 
PDF
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
dotCloud
 
PDF
Introduction to docker
John Willis
 
PDF
Docker worshop @Twitter - How to use your own private registry
dotCloud
 
PDF
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
PDF
A Gentle Introduction To Docker And All Things Containers
Jérôme Petazzoni
 
PDF
Demystifying kubernetes
Works Applications
 
PPTX
Introduction To Docker
Dr. Syed Hassan Amin
 
PPTX
Intro Docker october 2013
dotCloud
 
PPTX
Docker
Mutlu Okuducu
 
PDF
Bare Metal to OpenStack with Razor and Chef
Matt Ray
 
Learning Docker with Thomas
Thomas Tong, FRM, PMP
 
Docker
Chen Chun
 
Introduction To Docker
Hamilton Turner
 
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
Introduction to Docker
Jian Wu
 
Docker introduction
dotCloud
 
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
Basic docker for developer
Weerayut Hongsa
 
Docker - introduction
Michał Kurzeja
 
Docker Introduction
Hao Fan
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
dotCloud
 
Introduction to docker
John Willis
 
Docker worshop @Twitter - How to use your own private registry
dotCloud
 
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
A Gentle Introduction To Docker And All Things Containers
Jérôme Petazzoni
 
Demystifying kubernetes
Works Applications
 
Introduction To Docker
Dr. Syed Hassan Amin
 
Intro Docker october 2013
dotCloud
 
Bare Metal to OpenStack with Razor and Chef
Matt Ray
 

Viewers also liked (7)

DOC
Radhika_Jain_CV
Radhika Jain
 
PPT
Final special education
Dr smriti mona
 
PPTX
Programming Haskell Chapter 11 切符番号選び
dekosuke
 
PPTX
Scalamacrosについて
dekosuke
 
PPT
Inclusive education
Dr smriti mona
 
KEY
プログラミングHaskell 第五章
dekosuke
 
PPTX
Data.mapについて
dekosuke
 
Radhika_Jain_CV
Radhika Jain
 
Final special education
Dr smriti mona
 
Programming Haskell Chapter 11 切符番号選び
dekosuke
 
Scalamacrosについて
dekosuke
 
Inclusive education
Dr smriti mona
 
プログラミングHaskell 第五章
dekosuke
 
Data.mapについて
dekosuke
 
Ad

Similar to Docker module 1 (20)

PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
PDF
Introduction to Docker
Aditya Konarde
 
PPTX
OpenStack Boston
Docker, Inc.
 
PPTX
Docker open stack boston
dotCloud
 
PDF
Docker basic
Somenath Ghosh
 
PDF
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Jérôme Petazzoni
 
PPTX
OpenStack Summit
Docker, Inc.
 
PPTX
Docker Starter Pack
Saeed Hajizade
 
PPTX
Java developer intro to environment management with vagrant puppet and docker
Getting value from IoT, Integration and Data Analytics
 
PDF
Introducing Docker
Francesco Pantano
 
PDF
Introduction to Docker and deployment and Azure
Jérôme Petazzoni
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PPTX
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Lucas Jellema
 
PPTX
Intro to Docker November 2013
Docker, Inc.
 
PDF
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Jérôme Petazzoni
 
PDF
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud
 
PDF
Django and Docker
Docker, Inc.
 
ODP
Docker - The Linux container
Balaji Rajan
 
PDF
Docker and OpenStack Boston Meetup
Kamesh Pemmaraju
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
Introduction to Docker
Aditya Konarde
 
OpenStack Boston
Docker, Inc.
 
Docker open stack boston
dotCloud
 
Docker basic
Somenath Ghosh
 
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Jérôme Petazzoni
 
OpenStack Summit
Docker, Inc.
 
Docker Starter Pack
Saeed Hajizade
 
Java developer intro to environment management with vagrant puppet and docker
Getting value from IoT, Integration and Data Analytics
 
Introducing Docker
Francesco Pantano
 
Introduction to Docker and deployment and Azure
Jérôme Petazzoni
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Lucas Jellema
 
Intro to Docker November 2013
Docker, Inc.
 
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Jérôme Petazzoni
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud
 
Django and Docker
Docker, Inc.
 
Docker - The Linux container
Balaji Rajan
 
Docker and OpenStack Boston Meetup
Kamesh Pemmaraju
 
Ad

More from Liang Bo (6)

PDF
99cloud training material
Liang Bo
 
PDF
Your first c# app on OpenStack
Liang Bo
 
PDF
99cloud openstack ci
Liang Bo
 
PDF
OpenStack Neutron Introduction
Liang Bo
 
PDF
how to use openstack api
Liang Bo
 
PDF
Docker with openstack
Liang Bo
 
99cloud training material
Liang Bo
 
Your first c# app on OpenStack
Liang Bo
 
99cloud openstack ci
Liang Bo
 
OpenStack Neutron Introduction
Liang Bo
 
how to use openstack api
Liang Bo
 
Docker with openstack
Liang Bo
 

Recently uploaded (20)

PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 

Docker module 1

  • 2. COURSE INTRODUCTION DAY 01 • Docker Introduction • Installation of Docker • Working with Containers • Working with Images • Building image with Dockerfiles • OpenStack Integration • OpenStack Introduction • Nova Driver (Docker as Compute Service) • Glance as Docker image registry DAY 02 • Docker Cluster • Kubernetes Introduction • Docker Networking • Docker Hub • Docker Cases • Docker Source Code • Development Platform With Docker • Hadoop on Docker
  • 3. 8 n , D r S OcM k8 l o n O e n gtu e S p 8 o a G P 8y h [email protected] http://github.com/onetown http://liangbo.me Infrastructure 90% Storage, Network, Virtualization ,Container 40% Front-end, HTML, CSS, Javascript 60% Python, C Sharp, Go-lang Development 90%Liang Bo (TRYSTACK.CN )
  • 5. Docker For Beginners Docker is an open platform for developers and sysadmins tobuild, ship, and run distributed applications.Consisting ofDocker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloudservice for sharing applications and automating workflows,Docker enables apps tobe quickly assembledfrom components and eliminates the frictionbetweendevelopment,QA, and production environments. As a result,IT can ship faster and run the same app,unchanged,on laptops, data center VMs, and any cloud. 03 Looking for Something Specific Develop, Ship and Runany application,anywhere 04 Looking for Help https://docs.docker.com 02 Learning Docker consists of: The Docker Engine - our lightweight and powerful open source container virtualization technology combined witha work flow for building and containerizing your applications. Docker Hub - our SaaS service for sharing and managing your application stacks. 01 Installation Docker requires a 64-bit installation regardless of your Linux version. Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor versionor a newer maintained version are also acceptable.
  • 6. The$Challenge Static website Web frontend User DB Queue Analytics DB Backgroundworkers 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 Development VM QA server PublicCloud Disaster recovery Contributor’slaptop ProductionServers MultiplicityofStacks Multiplicityof hardware environments ProductionCluster CustomerData Center Doservicesandapps interactappropriately? CanImigratesmoothly andquickly?
  • 7. Application$Matrix Static website Web frontend Background workers User DB Analytics DB Queue Development VM QA Server Single Prod Server Onsite Cluster Public Cloud Contributor’s laptop Customer Servers ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
  • 8. Explanation • High Level—It’s a lightweight VM • Own process space • Own network interface • Can run stuff asroot • Can have itsown/sbin/init (different from host) • <<machine container>> • Low Level—It’s chroot on steroids • Can alsonot have itsown/sbin/init • Container=isolatedprocesses • Share kernelwithhost • Nodevice emulation (neither HVM nor PV) fromhost) • <<application container>> • Runeverywhere • Regardless of kernel version (2.6.32+) • Regardless of host distro • Physical or virtual, cloudor not • Containerand host architecturemust match* • Run anything • If it can run onthe host,it canrun in the container • i.e. if it can run ona Linuxkernel, it can run WHY WHAT
  • 9. Introduction • Docker is an open-sourceengine that automatesthe deployment of any application as a lightweight, portable, self-sufficient container that will runvirtually anywhere. • Based onLXC (Linux Container), easy to use. • Similar to VM asend-user with different features. • Founded in 2013 (dotCloud) • Joined Linux Foundation • Apache 2.0 License • Implemented by Golang
  • 12. 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 onwritecapabilities allow us to onlysave the diffs Between container A and container A’ VMs Every app, every copy ofan 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
  • 13. Basic$Docker System Source Code Repository Dockerfile For A Docker Engine Docker Container Image Registry Build Docker Host 2 OS (Linux) ContainerA ContainerB ContainerC ContainerA Push Search Pull Run Host 1 OS (Linux)
  • 14. Changes$and$Updates Docker Engine Docker Container Image Registry Docker Engine Push Update Bins/ Libs App A AppΔ Bins/ Base Container Image Host is now runningA’’ Container Mod A’’ AppΔ Bins/ Bins/ Libs App A Bins/ Bins/ Libs App A’’ Host runningA wantsto upgradetoA’’. Requests update.Gets only diffs Container Mod A’
  • 15. Ecosystem • Operatingsystems • Virtually anydistribution with a 2.6.32+ kernel • Red Hat/Docker collaboration to makework acrossRHEL 6.4+, Fedora, and other membersof thefamily (2.6.32 +) • CoreOS—Small coreOS purposebuilt with Docker • OpenStack • Docker integration into NOVA(& compatibility with Glance, Horizon, etc.) accepted for Havana release • Private PaaS • OpenShift • Solum (Rackspace, OpenStack) • Public PaaS • Deis, Voxoz, Cocaine (Yandex), Baidu PaaS • Public IaaS • Native support in Rackspace, Digital Ocean,+++ • AMI (or equivalent) available for AWS & other • DevOps Tools • Integrationswith Chef, Puppet, Jenkins, Travis, Salt, Ansible+++ • Orchestration tools • Mesos, Heat, ++ • Shipyard &otherspurposebuilt for Docker • Applications • 1000’s of Dockerized applications available at index.docker.io
  • 21. Run Docker ? $ sudo docker run ubuntu:14.04 /bin/echo 'Hello world’ Hello world sudo docker run -t -i ubuntu:14.04 /bin/bash root@73a19a637b54:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
  • 23. Ubuntu 14.04 $ sudo apt-get update $ sudo apt-get install –y docker.io $ sudo ln –sf /usr/bin/docker.io/usr/local/bin/docker $ sudo sed –I ‘$acomplete –F _docker docker’ /etc/bash_completion.d/docker.io
  • 24. Ubuntu 14.04 – Docker Official Release (New) $ sudo apt-key adv –keyserverhkp://keyserver.ubuntu.com:80 –recv-keys36A1D7869245C895 $ sudo bash –c “echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list $ sudo apt-get update $ sudo apt-get installlxc-docker
  • 26. Get Image $ sudo docker pull ubuntu:14.04 Pullingrepositoryubuntu 07f8e8c5e660:Downloadcomplete e9e06b06e14c: Downloadcomplete a82efea989f9: Downloadcomplete 37bea4ee0c81: Downloadcomplete
  • 27. Get Image From Specific Server $ sudo docker pull dl.dockerpool.com:5000 ubuntu:14.04 Pullingrepositoryubuntu 07f8e8c5e660:Downloadcomplete e9e06b06e14c: Downloadcomplete a82efea989f9: Downloadcomplete 37bea4ee0c81: Downloadcomplete
  • 28. List Images $ sudo docker images REPOSITORY TAG IMAGEID CREATED VIRTUAL SIZE ubuntu 14.04 07f8e8c5e660 2weeks ago 188.3MB
  • 33. OpenStack$Projects • Core Projects • Nova(Compute Service) • Glance (Image Service) • Neutron (Network Service) • Cinder (Block StorageService) • Swift (Object StorageService) • Common Projects • Keystone (Identity Service) • Horizon (Dashboard) • Ceilometer (Telemeter Service) • Heat (Orchestration Service) • Shared Modules • Oslo (Shared Infrastructure Code) • Incubation Projects • Magnum (Container Service)
  • 34. OpenStack$Project • Eachproject is a “top-level” OpenStack part • Eachproject has a “Project TechnicalLeader” (PTL) • Eachproject has different developers and designers • Eachproject has well designed public API • Except Horizon, it’s a WEB UI • Allother project providea RESTful API(JSON/HTTP) • Eachproject has isolated database
  • 40. Demo - Nova Driver – (Docker as compute Service) !
  • 41. Demo - Glance as Docker Image Registry !