SlideShare a Scribd company logo
Scale Big With Docker

February 2014—Docker 0.8.0
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
Deploy everything
●

webapps

●

backends

●

SQL, NoSQL

●

big data

●

message queues

●

… and more
Deploy almost everywhere
●

Linux servers

●

VMs or bare metal

●

Any distro

●

Kernel 3.8 (or RHEL 2.6.32)
Deploy reliably & consistently
●

If it works locally, it will work on the server

●

With exactly the same behavior

●

Regardless of versions

●

Regardless of distros

●

Regardless of dependencies
Deploy easily
●

Don't learn a new CM tool

●

Reuse components and recipes

●

Don't install anything fancy locally
(One single local VM to handle all your apps)
Deploy at scale
●

Build once

●

Deploy anywhere

●

Deploy quickly
–
–

Docker runtime itself is lightweight

–
●

Images are lightweight
Fast start/stop times

Manage Docker with its REST API
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
Problem: shipping goods
?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?
Solution:
the intermodal shipping container
Scale Big With Docker — Moboom 2014
Problem: shipping code
django
web frontend
node.js
async API
background
workers
SQL
database
distributed
DB, big data
message
queue

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

my
laptop

your
laptop

staging

prod on
cloud VM

prod on
bare metal

QA
Solution:
the Linux container
High level approach:
it's a lightweight VM
●

I can SSH into it

●

I have root access

●

I can apt-get/yum install packages

●

I don't see the host system (or other containers)

« Machine Container »
Low level approach:
it's chroot on steroids
●

I can run a single program

●

container = isolated process(es)

●

share kernel with host

●

no device emulation → no overhead

« Application Container »
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
Scale Big With Docker — Moboom 2014
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
One-time setup
●

On your servers (Linux)
–
–

Single binary install (Golang FTW!)

–
●

Packages (Ubuntu, Debian, Fedora, Gentoo, Arch...)
Easy provisioning on Rackspace, Digital Ocean, EC2, GCE...

On your dev env (Linux, OS X, Windows)
–
–

boot2docker (25 MB VM image)

–
●

Vagrantfile
Natively (if you run Linux)
The Docker workflow 1/2
●

Work in dev environment
(local machine or container)

●

Other services can be perfect copies of prod

●

Whenever you want to test « for real »:
–

Build in seconds

–

Run instantly
The Docker workflow 2/2
●

Push your build to a registry (public or private)

●

Run it in CI/CD

●

Run it in production

●

Rejoice

Something goes wrong?
Just re-run previous version (it's still there!)
I'm starting a new project!
●

Each service will be in its own container(s)

●

Build an image for each service

●

Pin dependencies (packages etc.) accurately

●

Link services together

→ Recommended workflow!
I'm Dockerizing some code!
●
●

●

●

Making a single service runnable on Docker
Create a « Dockerfile »
(Think Makefile, Vagrantfile...)
If it's on GitHub, create a Trusted Build
(will automatically build ready-to-run images)
In any case, register it on index.docker.io
I'm migrating to Docker!
●

Easy if there is only one service per server
–

Dockerize the service

–

Containerize administrative functions (logs...)

●

Otherwise, try to split services

●

You don't need to move everything to Docker

●

Don't use containers as VMs, even if you can!
I'm already using
Chef/Puppet/Salt/Ansible/...!
●

Plan A: generic images
–
–

Run that image just like you would run a VM

–
●

Put your configuration management tool in an image
Great for mixed environments

Plan B: specialized images
–

Put your configuration management tool in an image

–

Run that image, freeze the result, run it!

–

Faster and safer
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
Authoring images
with run/commit
1) docker run ubuntu bash
2) apt-get install this and that
3) docker commit <containerid> <imagename>
4) docker run <imagename> bash
5) git clone git://.../mycode
6) pip install -r requirements.txt
7) docker commit <containerid> <imagename>
8) repeat steps 4-7 as necessary
9) docker tag <imagename> <user/image>
10) docker push <user/image>
Authoring images
with run/commit
●

Pros
–
–

●

Convenient, nothing to learn
Can roll back/forward if needed

Cons
–

Manual process

–

Iterative changes stack up

–

Full rebuilds are boring, error-prone
Authoring images
with a Dockerfile
FROM ubuntu
RUN
RUN
RUN
RUN
RUN

apt-get
apt-get
apt-get
apt-get
apt-get

-y update
install -y
install -y
install -y
install -y

g++
erlang-dev erlang-manpages erlang-base-hipe ...
libmozjs185-dev libicu-dev libtool ...
make wget

RUN wget http://.../apache-couchdb-1.3.1.tar.gz | tar -C /tmp -zxfRUN cd /tmp/apache-couchdb-* && ./configure && make install
RUN printf "[httpd]nport = 8101nbind_address = 0.0.0.0" >
/usr/local/etc/couchdb/local.d/docker.ini

EXPOSE 8101
CMD ["/usr/local/bin/couchdb"]

docker build -t jpetazzo/couchdb .
Authoring images
with a Dockerfile
●

Almost nothing to learn

●

Rebuilds are easy

●

Caching system makes rebuilds faster

●

Single file to define the whole environment!
Outline
●

Why should I care?

●

The container metaphor

●

Very quick demo

●

Working with Docker

●

Building images

●

Docker future
Docker: the community
●

Docker: >330 contributors

●

Docker inc.: <20 engineers

●

latest milestone (0.8): >120 contributors

●

~50% of all commits by external contributors

●

GitHub repository: >1400 forks

...and counting!
Coming Soon
●

Network acceleration

●

Container-specific metrics

●

Consolidated logging

●

Plugins (compute backends...)

Those things are already possible,
but will soon be part of the core.
Docker 1.0
●

Multi-arch, multi-OS

●

Stable control API

●

Stable plugin API

●

Resiliency

●

Signature

●

Clustering
Thank you! Questions?
http://docker.io/
http://docker.com/
https://github.com/dotcloud/docker
@docker
@jpetazzo

More Related Content

What's hot (20)

PDF
The State of Puppet - Dan Bode
Puppet
 
PPTX
Docker session III: Dockerfile
Degendra Sivakoti
 
PDF
Dev to Delivery with Puppet, Vagrant and AWS
Puppet
 
PDF
JOSA TechTalk: Taking Docker to Production
Jordan Open Source Association
 
PPTX
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
PDF
Performance Profiling Tools and Tricks
Phase2
 
PDF
Docker mentorweek
Pavan Wankhade
 
PDF
Docker in Production
Jirayut Nimsaeng
 
PDF
Docker Workshop Birthday #3
Jirayut Nimsaeng
 
PDF
Joomla Continuous Delivery with Docker
Jirayut Nimsaeng
 
PDF
Docker Workshop for beginner
Jirayut Nimsaeng
 
PPTX
Docker session II: Introduction to Docker
Degendra Sivakoti
 
PDF
Stop Sucking at Building Stuff!
Puppet
 
PDF
Docker from a team perspective
Edwin Vlieg
 
PDF
Vagrant + Ansible + Docker
Vijay Selvaraj
 
PDF
Containers: from development to production at DevNation 2015
Jérôme Petazzoni
 
PDF
Docker Continuous Delivery Workshop
Jirayut Nimsaeng
 
PDF
Virtualisation - Vagrant and Docker
James Ford
 
PDF
Docker Introduction
MANAOUIL Karim
 
PPTX
Run automated tests in Docker
Oleksandr Metelytsia
 
The State of Puppet - Dan Bode
Puppet
 
Docker session III: Dockerfile
Degendra Sivakoti
 
Dev to Delivery with Puppet, Vagrant and AWS
Puppet
 
JOSA TechTalk: Taking Docker to Production
Jordan Open Source Association
 
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
Performance Profiling Tools and Tricks
Phase2
 
Docker mentorweek
Pavan Wankhade
 
Docker in Production
Jirayut Nimsaeng
 
Docker Workshop Birthday #3
Jirayut Nimsaeng
 
Joomla Continuous Delivery with Docker
Jirayut Nimsaeng
 
Docker Workshop for beginner
Jirayut Nimsaeng
 
Docker session II: Introduction to Docker
Degendra Sivakoti
 
Stop Sucking at Building Stuff!
Puppet
 
Docker from a team perspective
Edwin Vlieg
 
Vagrant + Ansible + Docker
Vijay Selvaraj
 
Containers: from development to production at DevNation 2015
Jérôme Petazzoni
 
Docker Continuous Delivery Workshop
Jirayut Nimsaeng
 
Virtualisation - Vagrant and Docker
James Ford
 
Docker Introduction
MANAOUIL Karim
 
Run automated tests in Docker
Oleksandr Metelytsia
 

Viewers also liked (17)

PDF
งานคอม ใบงานที่ 2 8 แก้แล้ว
noeiinoii
 
PDF
Startup Asia Jakarta 2013: CEO Tips
Tech in Asia
 
PDF
MCX Market Updates 18-November
Rakhi Tips Provider
 
PDF
Black History Month Sir John Compton
Unitedpac St. Lucia News
 
PPTX
El nuevo Houdini Chapter 5
ander1gp
 
PDF
Introduction to Docker at Glidewell Laboratories in Orange County
Jérôme Petazzoni
 
PDF
Генераторы газов Peak Scientific для приборов waters
Anatoliy Arkhipov
 
PDF
Daily NCDEX Market Updates 4-December
Rakhi Tips Provider
 
PDF
Black history month-Sir Arthur Lewis
Unitedpac St. Lucia News
 
DOC
แบบเสนอโครงร างโครงงานคอมพ วเตอร_
noeiinoii
 
PDF
Salcedo SkySuites Makati 1BR Suite Model Units
dreamcityph
 
PPTX
Medical malpractice insurance
ipageass2
 
PPTX
UNITED WORKERS PARTY CELEBRATING 50 YEARS
Unitedpac St. Lucia News
 
PPTX
Generación y separación
Diego Saltos
 
PPTX
Transforming primary care
Primary Care Commissioning (PCC)
 
PPTX
Megoldásközpontú szociális tanácsadás
Bernadette Gelsei
 
งานคอม ใบงานที่ 2 8 แก้แล้ว
noeiinoii
 
Startup Asia Jakarta 2013: CEO Tips
Tech in Asia
 
MCX Market Updates 18-November
Rakhi Tips Provider
 
Black History Month Sir John Compton
Unitedpac St. Lucia News
 
El nuevo Houdini Chapter 5
ander1gp
 
Introduction to Docker at Glidewell Laboratories in Orange County
Jérôme Petazzoni
 
Генераторы газов Peak Scientific для приборов waters
Anatoliy Arkhipov
 
Daily NCDEX Market Updates 4-December
Rakhi Tips Provider
 
Black history month-Sir Arthur Lewis
Unitedpac St. Lucia News
 
แบบเสนอโครงร างโครงงานคอมพ วเตอร_
noeiinoii
 
Salcedo SkySuites Makati 1BR Suite Model Units
dreamcityph
 
Medical malpractice insurance
ipageass2
 
UNITED WORKERS PARTY CELEBRATING 50 YEARS
Unitedpac St. Lucia News
 
Generación y separación
Diego Saltos
 
Transforming primary care
Primary Care Commissioning (PCC)
 
Megoldásközpontú szociális tanácsadás
Bernadette Gelsei
 
Ad

Similar to Scale Big With Docker — Moboom 2014 (20)

PDF
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet
 
PDF
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Jérôme Petazzoni
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PPTX
Using Docker to boost your development experience with Drupal
dockerizedrupal
 
PDF
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
TheFamily
 
PDF
Introduction to Docker, December 2014 "Tour de France" Edition
Jérôme Petazzoni
 
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
PDF
A Gentle Introduction to Docker and Containers
Docker, Inc.
 
PDF
Docker for developers
DrupalDay
 
PDF
Introduction to Docker and Containers
Docker, Inc.
 
PDF
JOSA TechTalks - Docker in Production
Jordan Open Source Association
 
PDF
Docker primer and tips
Samuel Chow
 
PDF
AllTheTalks 2020: Buildpacks - container for everyone!
Zander Mackie
 
PDF
[@NaukriEngineering] Docker 101
Naukri.com
 
ODP
Docker on Power Systems
Cesar Maciel
 
PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
PDF
Adventures in docker compose
LinkMe Srl
 
PDF
Using Docker to build and test in your laptop and Jenkins
Micael Gallego
 
PDF
Docker+java
DPC Consulting Ltd
 
PDF
Real-World Docker: 10 Things We've Learned
RightScale
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet
 
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Jérôme Petazzoni
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Using Docker to boost your development experience with Drupal
dockerizedrupal
 
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
TheFamily
 
Introduction to Docker, December 2014 "Tour de France" Edition
Jérôme Petazzoni
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
A Gentle Introduction to Docker and Containers
Docker, Inc.
 
Docker for developers
DrupalDay
 
Introduction to Docker and Containers
Docker, Inc.
 
JOSA TechTalks - Docker in Production
Jordan Open Source Association
 
Docker primer and tips
Samuel Chow
 
AllTheTalks 2020: Buildpacks - container for everyone!
Zander Mackie
 
[@NaukriEngineering] Docker 101
Naukri.com
 
Docker on Power Systems
Cesar Maciel
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
Adventures in docker compose
LinkMe Srl
 
Using Docker to build and test in your laptop and Jenkins
Micael Gallego
 
Docker+java
DPC Consulting Ltd
 
Real-World Docker: 10 Things We've Learned
RightScale
 
Ad

More from Jérôme Petazzoni (20)

PDF
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
PDF
Orchestration for the rest of us
Jérôme Petazzoni
 
PDF
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Jérôme Petazzoni
 
PDF
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
Jérôme Petazzoni
 
PDF
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
Jérôme Petazzoni
 
PDF
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Jérôme Petazzoni
 
PDF
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
PDF
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
PDF
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Jérôme Petazzoni
 
PDF
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
PDF
Microservices. Microservices everywhere! (At OSCON 2015)
Jérôme Petazzoni
 
PDF
Deploy microservices in containers with Docker and friends - KCDC2015
Jérôme Petazzoni
 
PDF
Immutable infrastructure with Docker and containers (GlueCon 2015)
Jérôme Petazzoni
 
PDF
The Docker ecosystem and the future of application deployment
Jérôme Petazzoni
 
PDF
Docker: automation for the rest of us
Jérôme Petazzoni
 
PDF
Docker Non Technical Presentation
Jérôme Petazzoni
 
PDF
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
PDF
Containerization is more than the new Virtualization: enabling separation of ...
Jérôme Petazzoni
 
PDF
Pipework: Software-Defined Network for Containers and Docker
Jérôme Petazzoni
 
PDF
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
Orchestration for the rest of us
Jérôme Petazzoni
 
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Jérôme Petazzoni
 
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
Jérôme Petazzoni
 
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
Jérôme Petazzoni
 
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Jérôme Petazzoni
 
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Jérôme Petazzoni
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
Microservices. Microservices everywhere! (At OSCON 2015)
Jérôme Petazzoni
 
Deploy microservices in containers with Docker and friends - KCDC2015
Jérôme Petazzoni
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Jérôme Petazzoni
 
The Docker ecosystem and the future of application deployment
Jérôme Petazzoni
 
Docker: automation for the rest of us
Jérôme Petazzoni
 
Docker Non Technical Presentation
Jérôme Petazzoni
 
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
Containerization is more than the new Virtualization: enabling separation of ...
Jérôme Petazzoni
 
Pipework: Software-Defined Network for Containers and Docker
Jérôme Petazzoni
 
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 

Recently uploaded (20)

PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 

Scale Big With Docker — Moboom 2014

  • 1. Scale Big With Docker February 2014—Docker 0.8.0
  • 2. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 3. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 4. Deploy everything ● webapps ● backends ● SQL, NoSQL ● big data ● message queues ● … and more
  • 5. Deploy almost everywhere ● Linux servers ● VMs or bare metal ● Any distro ● Kernel 3.8 (or RHEL 2.6.32)
  • 6. Deploy reliably & consistently ● If it works locally, it will work on the server ● With exactly the same behavior ● Regardless of versions ● Regardless of distros ● Regardless of dependencies
  • 7. Deploy easily ● Don't learn a new CM tool ● Reuse components and recipes ● Don't install anything fancy locally (One single local VM to handle all your apps)
  • 8. Deploy at scale ● Build once ● Deploy anywhere ● Deploy quickly – – Docker runtime itself is lightweight – ● Images are lightweight Fast start/stop times Manage Docker with its REST API
  • 9. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 13. Problem: shipping code django web frontend node.js async API background workers SQL database distributed DB, big data message queue ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? my laptop your laptop staging prod on cloud VM prod on bare metal QA
  • 15. High level approach: it's a lightweight VM ● I can SSH into it ● I have root access ● I can apt-get/yum install packages ● I don't see the host system (or other containers) « Machine Container »
  • 16. Low level approach: it's chroot on steroids ● I can run a single program ● container = isolated process(es) ● share kernel with host ● no device emulation → no overhead « Application Container »
  • 17. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 19. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 20. One-time setup ● On your servers (Linux) – – Single binary install (Golang FTW!) – ● Packages (Ubuntu, Debian, Fedora, Gentoo, Arch...) Easy provisioning on Rackspace, Digital Ocean, EC2, GCE... On your dev env (Linux, OS X, Windows) – – boot2docker (25 MB VM image) – ● Vagrantfile Natively (if you run Linux)
  • 21. The Docker workflow 1/2 ● Work in dev environment (local machine or container) ● Other services can be perfect copies of prod ● Whenever you want to test « for real »: – Build in seconds – Run instantly
  • 22. The Docker workflow 2/2 ● Push your build to a registry (public or private) ● Run it in CI/CD ● Run it in production ● Rejoice Something goes wrong? Just re-run previous version (it's still there!)
  • 23. I'm starting a new project! ● Each service will be in its own container(s) ● Build an image for each service ● Pin dependencies (packages etc.) accurately ● Link services together → Recommended workflow!
  • 24. I'm Dockerizing some code! ● ● ● ● Making a single service runnable on Docker Create a « Dockerfile » (Think Makefile, Vagrantfile...) If it's on GitHub, create a Trusted Build (will automatically build ready-to-run images) In any case, register it on index.docker.io
  • 25. I'm migrating to Docker! ● Easy if there is only one service per server – Dockerize the service – Containerize administrative functions (logs...) ● Otherwise, try to split services ● You don't need to move everything to Docker ● Don't use containers as VMs, even if you can!
  • 26. I'm already using Chef/Puppet/Salt/Ansible/...! ● Plan A: generic images – – Run that image just like you would run a VM – ● Put your configuration management tool in an image Great for mixed environments Plan B: specialized images – Put your configuration management tool in an image – Run that image, freeze the result, run it! – Faster and safer
  • 27. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 29. 1) docker run ubuntu bash 2) apt-get install this and that 3) docker commit <containerid> <imagename> 4) docker run <imagename> bash 5) git clone git://.../mycode 6) pip install -r requirements.txt 7) docker commit <containerid> <imagename> 8) repeat steps 4-7 as necessary 9) docker tag <imagename> <user/image> 10) docker push <user/image>
  • 30. Authoring images with run/commit ● Pros – – ● Convenient, nothing to learn Can roll back/forward if needed Cons – Manual process – Iterative changes stack up – Full rebuilds are boring, error-prone
  • 32. FROM ubuntu RUN RUN RUN RUN RUN apt-get apt-get apt-get apt-get apt-get -y update install -y install -y install -y install -y g++ erlang-dev erlang-manpages erlang-base-hipe ... libmozjs185-dev libicu-dev libtool ... make wget RUN wget http://.../apache-couchdb-1.3.1.tar.gz | tar -C /tmp -zxfRUN cd /tmp/apache-couchdb-* && ./configure && make install RUN printf "[httpd]nport = 8101nbind_address = 0.0.0.0" > /usr/local/etc/couchdb/local.d/docker.ini EXPOSE 8101 CMD ["/usr/local/bin/couchdb"] docker build -t jpetazzo/couchdb .
  • 33. Authoring images with a Dockerfile ● Almost nothing to learn ● Rebuilds are easy ● Caching system makes rebuilds faster ● Single file to define the whole environment!
  • 34. Outline ● Why should I care? ● The container metaphor ● Very quick demo ● Working with Docker ● Building images ● Docker future
  • 35. Docker: the community ● Docker: >330 contributors ● Docker inc.: <20 engineers ● latest milestone (0.8): >120 contributors ● ~50% of all commits by external contributors ● GitHub repository: >1400 forks ...and counting!
  • 36. Coming Soon ● Network acceleration ● Container-specific metrics ● Consolidated logging ● Plugins (compute backends...) Those things are already possible, but will soon be part of the core.
  • 37. Docker 1.0 ● Multi-arch, multi-OS ● Stable control API ● Stable plugin API ● Resiliency ● Signature ● Clustering