SlideShare una empresa de Scribd logo
1 de 101
Docker for Fun and Profit 
Carl Quinn 
Java Posse, Riot Games 
http://github.com/cquinn/devoxx14 
#DV14 #Docker4Fun @cquinn
Schedule 
➡About Docker 
➡Getting Docker 
➡Booting to Docker 
➡The Docker Daemon 
➡Images and Containers 
➡Images, Layer by Layer 
➡Simple Dockerized 
Service 
➡Containers and Networks 
➡Containers and Volumes 
➡Linking Containers 
Together 
➡Using cAdvisor 
➡Basic Docker Clusters 
➡Fleet 
➡More: Mesos, Kubernetes 
#DV14 #Docker4Fun @cquinn
About Docker 
What It Is 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
Containerization vs Virtualization 
#DV14 #Docker4Fun @cquinn
Containerization vs Virtualization 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
About Docker 
Origins 
#DV14 #Docker4Fun @cquinn
Origins 
• Google circa 2007 
• Linux cgroups (control groups) (resource limits) 
• Linux namespaces (resource isolation) 
• Docker circa 2013 
• Layered virtual filesystem 
• One stop shop encapsulating many Linux kernel features 
#DV14 #Docker4Fun @cquinn
About Docker 
Why It Is So Good 
#DV14 #Docker4Fun @cquinn
Sounds cool, but what’s the big deal? 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
Universal Deployable Artifact 
• Complete: Everything the app needs is in the artifact. 
• Small: The artifact is small enough to be easily managed. 
• Immutable: The contents of the artifact can’t change. 
• Universal: The artifact can run on any Linux host. 
• Deployable: The artifact can actually be run directly, without 
being unpacked or installed. 
#DV14 #Docker4Fun @cquinn
Image Sharing 
• Universal Images are Easy to Share 
• https://hub.docker.com/ 
#DV14 #Docker4Fun @cquinn
Getting Docker 
#DV14 #Docker4Fun @cquinn
Home base 
• https://docker.com/ 
• Current version: 1.3.1 
• Requires 64-bit Linux 
#DV14 #Docker4Fun @cquinn
Docker Environment on Linux 
• Ubuntu Trusty (14.4) 
• CentOS 7 
• CoreOS https://coreos.com/ 472.0.1 
• Other Linux: RedHat, Fedora, Debian, Gentoo, etc 
• Cloud: AWS, Rackspace, GCE, etc 
#DV14 #Docker4Fun @cquinn
Docker Environment on Mac 
• boot2docker 
• and/or: brew install docker 
• Installs virtual box with a tiny Linux that runs Docker 
• Docker cmdline client runs on Mac 
#DV14 #Docker4Fun @cquinn
Docker Environment on Windows 
• boot2docker 
• Installs virtual box with a tiny Linux that runs the Docker daemon 
• May have to shell into the VM to work 
• (I have no direct experience) 
#DV14 #Docker4Fun @cquinn
Booting to Docker 
Mac Version 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
Client / daemon Comm 
• Clear vs TLS 
• Boot2docker now defaults to TLS 
• Can switch to clear 
• /var/lib/boot2docker/profile : DOCKER_TLS=no 
#DV14 #Docker4Fun @cquinn
Clear Comm 
Daemon: 
/usr/local/bin/docker -d -D -g /var/lib/docker  
-H unix:// -H tcp://0.0.0.0:2375 
Client 
DOCKER_HOST=tcp://192.168.59.103:2375 
#DV14 #Docker4Fun @cquinn
TLS Comm 
Daemon 
/usr/local/bin/docker -d -D -g /var/lib/docker  
-H unix:// -H tcp://0.0.0.0:2376  
--tlsverify  
--tlscacert=/var/lib/boot2docker/tls/ca.pem  
--tlscert=/var/lib/boot2docker/tls/server.pem  
--tlskey=/var/lib/boot2docker/tls/serverkey.pem 
Client 
DOCKER_HOST=tcp://192.168.59.103:2376 
DOCKER_TLS_VERIFY=1 
DOCKER_CERT_PATH=/Users/cquinn/.boot2docker/certs/ 
#DV14 #Docker4Fun @cquinn
Boot2docker VM 
• vboxnet2 is mapped to nested Linux VM 
• My case: tcp://192.168.59.103 
#DV14 #Docker4Fun @cquinn
Poking around boot2docker 
boot2docker init 
boot2docker status 
boot2docker version 
boot2docker start 
boot2docker suspend 
boot2docker stop 
boot2docker restart 
boot2docker ssh 
docker info 
docker version 
#DV14 #Docker4Fun @cquinn
The Docker Daemon 
#DV14 #Docker4Fun @cquinn
Docker Client & Daemon 
#DV14 #Docker4Fun @cquinn
The Docker Daemon 
• Use same binary as cmdline Client 
• Runs on init or as needed 
• Does all the work 
#DV14 #Docker4Fun @cquinn
The Docker Daemon 
• Uses libcontainer to talk to Linux kernel 
• Starts process group for container 
• Creates namespaces for process group 
• Creates cgroups for resource quotas 
• Controls network access, port mapping 
• Controls volume mounting 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
Docker Daemon REST API 
• Docker daemon exposes an HTTP JSON over REST API 
• See: https://docs.docker.com/reference/api/docker_remote_api/ 
• Version 1.15 
• Normally this is over a local unix socket, but can go over tcp as 
well. 
#DV14 #Docker4Fun @cquinn
Talk to the Docker Daemon 
http http://192.168.59.103:2375/v1/_ping 
http http://192.168.59.103:2375/v1/version 
http http://192.168.59.103:2375/v1/info 
http http://192.168.59.103:2375/images/json?all=0 
http is HTTPie, a fancy curl 
https://github.com/jakubroztocil/httpie 
#DV14 #Docker4Fun @cquinn
Images and Containers 
#DV14 #Docker4Fun @cquinn
Images, Registries and Containers 
• Image is the package of bits (you might think of this as the 
container, but that’s not exactly right) 
• repository (think git repo) 
• tag 
• ID 
• Registry is the repository of images 
• Container is a running self-contained process group 
• Dockerfile is the Makefile for Docker images 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
docker images 
docker pull 
docker inspect 
docker tag 
docker push 
#DV14 #Docker4Fun @cquinn
Images, Layer by Layer 
#DV14 #Docker4Fun @cquinn
Image Layers 
#DV14 #Docker4Fun @cquinn
Base Image Examples 
• debian 
• busybox 
• ubuntu 
• centos 
• https://registry.hub.docker.co 
m/_/debian/ 
• https://registry.hub.docker.co 
m/_/busybox/ 
• https://registry.hub.docker.co 
m/_/ubuntu/ 
• https://registry.hub.docker.co 
m/_/centos/ 
#DV14 #Docker4Fun @cquinn
docker history 
#DV14 #Docker4Fun @cquinn
Simple Dockerized Service 
Example: ticktock 
#DV14 #Docker4Fun @cquinn
ticktock 
• Very simple Go app that just writes to stdout 
#DV14 #Docker4Fun @cquinn
ticktock 
… 
func main() { 
for i := 0; i < 10000; i++ { 
if i%2 == 0 { 
fmt.Printf("Tick %dn", i) 
} else { 
fmt.Printf("Tock %dn", i) 
} 
time.Sleep(1000 * time.Millisecond) 
} 
} 
#DV14 #Docker4Fun @cquinn
Build and run on Mac 
make clean ticktock 
./ticktock 
#DV14 #Docker4Fun @cquinn
Dockerize 
FROM busybox:ubuntu-14.04 
MAINTAINER cquinn 
ADD ./bin/linux/amd64/ticktock /ticktock 
CMD /ticktock 
#DV14 #Docker4Fun @cquinn
Dockerize 
make docker_image 
docker images 
docker history 
docker inspect 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
Containers and Networks 
Example: webhellogo 
#DV14 #Docker4Fun @cquinn
const CounterFile = "/data/counter" 
func main() { 
os.Mkdir("/data", os.ModeDir|0755) 
web.Get("/", func() string { 
msg := fmt.Sprintf("Hello Go言語%d!”, 
readUpdatedCounter()) // (Hello GoLanguage) 
fmt.Println(msg) 
return msg 
}) 
web.Run(":8080") 
} 
#DV14 #Docker4Fun @cquinn
func readUpdatedCounter() int { 
store, _ := ioutil.ReadFile(CounterFile) 
var i = 0 
fmt.Sscanf(string(store), "%d", &i) 
i++ 
store = []byte(fmt.Sprintf("%d", i)) 
ioutil.WriteFile(CounterFile, store, 0755) 
return i 
} 
#DV14 #Docker4Fun @cquinn
FROM busybox:ubuntu-14.04 
MAINTAINER cquinn 
ADD ./bin/linux/amd64/webhellogo /webhellogo 
CMD /webhellogo 
#DV14 #Docker4Fun @cquinn
make docker_image 
#DV14 #Docker4Fun @cquinn
docker run -d -p 9090:8080  
--name="webhellogo" cquinn/webhellogo 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
Containers and Volumes 
Example: webhellogo 
#DV14 #Docker4Fun @cquinn
docker run -d -p 9090:8080  
-v /home/docker:/data  
--name="webhellogo" cquinn/webhellogo 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
Linking Containers Together 
Example: figgy 
#DV14 #Docker4Fun @cquinn
Linked Containers 
#DV14 #Docker4Fun @cquinn
figgy app.py 
from flask import Flask 
from redis import Redis 
import os 
app = Flask(__name__) 
redis = Redis(host="redis_1", port=6379) 
@app.route('/') 
def hello(): 
redis.incr('hits') 
return 'Hello World! I have been seen %s times.' % 
redis.get('hits') 
if __name__ == "__main__": 
app.run(host="0.0.0.0", debug=True) 
#DV14 #Docker4Fun @cquinn
FROM orchardup/python:2.7 
ADD . /code 
WORKDIR /code 
RUN pip install -r requirements.txt 
#DV14 #Docker4Fun @cquinn
Fig 
• Use Fig instead of lots’o bash 
• http://www.fig.sh/ 
• https://github.com/docker/fig 
• http://blog.docker.com/2014/08/getting-started-with-orchestration- 
using-fig/ 
#DV14 #Docker4Fun @cquinn
figgy’s Fig fig.yml 
web: 
build: . 
command: python app.py 
ports: 
- "5000:5000" 
volumes: 
- .:/code 
links: 
- redis 
redis: 
image: orchardup/redis 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
Using cAdvisor 
Example: cadvisor 
#DV14 #Docker4Fun @cquinn
cAdvisor 
• https://github.com/google/cadvisor 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
Extra Credit 
• Can also hookup InfluxDB + Grafana 
• http://influxdb.com/ 
• http://grafana.org/ 
• Or use Heapster across a cluster 
• https://github.com/GoogleCloudPlatform/heapster 
#DV14 #Docker4Fun @cquinn
Clusters of Dockers 
#DV14 #Docker4Fun @cquinn
Clustering with Docker 
• Dockers are black boxes 
• Config goes into args & env. 
• Functional I/O is on network ports. 
• System needs to Solve 
• configuration delivery 
• dynamic service addressing 
#DV14 #Docker4Fun @cquinn
Deploy 
Service Addressing 
Cluster 
Docker 
Configuration 
#DV14 #Docker4Fun @cquinn
Basic Docker Clusters 
Example: cluster 
#DV14 #Docker4Fun @cquinn
docker 
#DV14 #Docker4Fun @cquinn
docker cloud-init 
coreos: 
units: 
- name: docker-tcp.socket 
command: start 
content: | 
[Unit] 
Description=Docker Socket for the API 
[Socket] 
ListenStream=2375 
Service=docker.service 
BindIPv6Only=both 
[Install] 
WantedBy=sockets.target 
#DV14 #Docker4Fun @cquinn
docker cloud-init (cont) 
- name: enable-docker-tcp.service 
command: start 
content: | 
[Unit] 
Description=Enable the Docker Socket for the API 
[Service] 
Type=oneshot 
ExecStart=/usr/bin/systemctl enable docker-tcp.socket 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
Fleet 
Example: fleet 
#DV14 #Docker4Fun @cquinn
fleet 
• https://coreos.com/using-coreos/clustering/ 
• https://coreos.com/docs/launching-containers/ 
launching/launching-containers-fleet/ 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
fleet cloud-init 
coreos: 
etcd: 
# generate a new token for each unique cluster from 
https://discovery.etcd.io/new 
discovery: 
https://discovery.etcd.io/b6efb8e37cfaafbabaeeca4392d74909 
# multi-region and multi-cloud deployments need to use 
$public_ipv4 
addr: $private_ipv4:4001 
peer-addr: $private_ipv4:7001 
units: 
- name: etcd.service 
command: start 
- name: fleet.service 
command: start 
#DV14 #Docker4Fun @cquinn
./fleetctl --endpoint=http://10.97.129.5:4001 $@ 
#DV14 #Docker4Fun @cquinn
myapp.service 
[Unit] 
Description=MyApp 
After=docker.service 
Requires=docker.service 
[Service] 
TimeoutStartSec=0 
ExecStartPre=-/usr/bin/docker kill busybox1 
ExecStartPre=-/usr/bin/docker rm busybox1 
ExecStartPre=/usr/bin/docker pull busybox 
ExecStart=/usr/bin/docker run --name busybox1 busybox /bin/sh -c 
"while true; do echo Hello World; sleep 1; done" 
ExecStop=/usr/bin/docker stop busybox1 
#DV14 #Docker4Fun @cquinn
Demo 
#DV14 #Docker4Fun @cquinn
More: Mesos, Kubernetes 
#DV14 #Docker4Fun @cquinn
Mesos 
• http://mesos.apache.org/ 
• https://mesosphere.com/learn/ 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
Kubernetes 
• Googles next generation “lmctfy” for Docker 
• https://github.com/GoogleCloudPlatform/kubernetes 
• Available on GCE 
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
#DV14 #Docker4Fun @cquinn
Admiral 
• Our Simple Cluster Manager 
#DV14 #Docker4Fun @cquinn
Admiral 
Admiral 
cmdline 
#DV14 #Docker4Fun @cquinn
Links & Credits 
• Images from 
• http://www.slideshare.net/dotCloud/docker-intro-november 
• https://coreos.com/ 
#DV14 #Docker4Fun @cquinn
Docker is the latest hotness in the deployment automation space, and opens a whole 
new world of opportunities in how we bundle, deploy and manage our running apps. 
Learn what Docker is all about and how to get started working with it. 
During this university, you will learn how to get Docker installed and get started using it 
to build and run your own containers. We'll take Docker apart and see how it works 
under the hood. Then we'll zoom out and experiment with Fleet and Mesos – 
interesting technologies built upon Docker for deploying containers to clusters of 
machines. All the while, we'll talk about how this new technology is poised to radically 
change how we think about deployment.

Más contenido relacionado

La actualidad más candente

Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real WorldTim Haak
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Bo-Yi Wu
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker RegistryZhichao Liang
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applicationsTerry Chen
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Dockerkanedafromparis
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains Docker, Inc.
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornPROIDEA
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPChris Tankersley
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterEueung Mulyana
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with DockerYosh de Vos
 
From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017Chris Tankersley
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containersBen Hall
 
Docker composeで開発環境をメンバに配布せよ
Docker composeで開発環境をメンバに配布せよDocker composeで開発環境をメンバに配布せよ
Docker composeで開発環境をメンバに配布せよYusuke Kon
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsBen Hall
 

La actualidad más candente (20)

Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real World
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applications
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Docker
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHP
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containers
 
Docker composeで開発環境をメンバに配布せよ
Docker composeで開発環境をメンバに配布せよDocker composeで開発環境をメンバに配布せよ
Docker composeで開発環境をメンバに配布せよ
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 

Destacado

Awesome text animations
Awesome text animationsAwesome text animations
Awesome text animationsd_boydst1
 
Imkt120 padilla juan_unit1_ip
Imkt120 padilla juan_unit1_ipImkt120 padilla juan_unit1_ip
Imkt120 padilla juan_unit1_ipJuan Padilla
 
Taking good Photographs for you Media Coursework
Taking good Photographs for you Media CourseworkTaking good Photographs for you Media Coursework
Taking good Photographs for you Media Courseworkcarolinebirksatwork
 
New york skyscrapers
New york skyscrapersNew york skyscrapers
New york skyscrapersWINDOSILL
 
Project presentation - Romania
Project presentation - RomaniaProject presentation - Romania
Project presentation - Romaniaprimariacatunele
 
2. Size Of Korean Market
2. Size Of Korean Market2. Size Of Korean Market
2. Size Of Korean MarketKj Hong
 
"Жди меня, и я вернусь, только очень жди…"
"Жди меня, и я вернусь, только очень жди…" "Жди меня, и я вернусь, только очень жди…"
"Жди меня, и я вернусь, только очень жди…" killaruns
 
El tigre-y-la-mona-1204580623404450-2 sonido
El tigre-y-la-mona-1204580623404450-2 sonidoEl tigre-y-la-mona-1204580623404450-2 sonido
El tigre-y-la-mona-1204580623404450-2 sonidoberanturi
 
Module for principles and application of precision agriculture
Module for principles and application of precision agricultureModule for principles and application of precision agriculture
Module for principles and application of precision agricultureJAWI Herbs Centre
 
203385462 o-net-53-ปีการศึกษา-2552
203385462 o-net-53-ปีการศึกษา-2552203385462 o-net-53-ปีการศึกษา-2552
203385462 o-net-53-ปีการศึกษา-2552apichaya413
 
April 2013 Newsletter
April 2013 NewsletterApril 2013 Newsletter
April 2013 NewsletterJOHNLEACH
 
Administaff Overview
Administaff OverviewAdministaff Overview
Administaff OverviewJMDeady
 

Destacado (20)

Ppt may6 2013
Ppt may6 2013Ppt may6 2013
Ppt may6 2013
 
Awesome text animations
Awesome text animationsAwesome text animations
Awesome text animations
 
Imkt120 padilla juan_unit1_ip
Imkt120 padilla juan_unit1_ipImkt120 padilla juan_unit1_ip
Imkt120 padilla juan_unit1_ip
 
Taking good Photographs for you Media Coursework
Taking good Photographs for you Media CourseworkTaking good Photographs for you Media Coursework
Taking good Photographs for you Media Coursework
 
Teamwork
TeamworkTeamwork
Teamwork
 
New york skyscrapers
New york skyscrapersNew york skyscrapers
New york skyscrapers
 
Project presentation - Romania
Project presentation - RomaniaProject presentation - Romania
Project presentation - Romania
 
2. Size Of Korean Market
2. Size Of Korean Market2. Size Of Korean Market
2. Size Of Korean Market
 
"Жди меня, и я вернусь, только очень жди…"
"Жди меня, и я вернусь, только очень жди…" "Жди меня, и я вернусь, только очень жди…"
"Жди меня, и я вернусь, только очень жди…"
 
El tigre-y-la-mona-1204580623404450-2 sonido
El tigre-y-la-mona-1204580623404450-2 sonidoEl tigre-y-la-mona-1204580623404450-2 sonido
El tigre-y-la-mona-1204580623404450-2 sonido
 
John conventions
John conventionsJohn conventions
John conventions
 
Module for principles and application of precision agriculture
Module for principles and application of precision agricultureModule for principles and application of precision agriculture
Module for principles and application of precision agriculture
 
Newspaper analysis 3
Newspaper analysis 3Newspaper analysis 3
Newspaper analysis 3
 
203385462 o-net-53-ปีการศึกษา-2552
203385462 o-net-53-ปีการศึกษา-2552203385462 o-net-53-ปีการศึกษา-2552
203385462 o-net-53-ปีการศึกษา-2552
 
Presentation1
Presentation1Presentation1
Presentation1
 
April 2013 Newsletter
April 2013 NewsletterApril 2013 Newsletter
April 2013 Newsletter
 
Ss 5 design_trust
Ss 5 design_trustSs 5 design_trust
Ss 5 design_trust
 
Ucsf 5 8
 Ucsf 5 8 Ucsf 5 8
Ucsf 5 8
 
Q-Plan
Q-PlanQ-Plan
Q-Plan
 
Administaff Overview
Administaff OverviewAdministaff Overview
Administaff Overview
 

Similar a Docker for Fun and Profit, Devoxx 2014

Clustering Docker with Docker Swarm on openSUSE
Clustering Docker with Docker Swarm on openSUSEClustering Docker with Docker Swarm on openSUSE
Clustering Docker with Docker Swarm on openSUSESaputro Aryulianto
 
Summary of DockerCon Europe.
Summary of DockerCon Europe. Summary of DockerCon Europe.
Summary of DockerCon Europe. Atul Jha
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇Philip Zheng
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇Philip Zheng
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationErica Windisch
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentalsAlper Unal
 
GDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSGDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSLadislav Prskavec
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyGiovanni Toraldo
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016XP Conference India
 
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Outlyer
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherKarim Vaes
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developersSuraj Deshmukh
 
Docker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetupDocker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetupWalid Shaari
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016Chris Tankersley
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for DevelopmentChris Tankersley
 

Similar a Docker for Fun and Profit, Devoxx 2014 (20)

Clustering Docker with Docker Swarm on openSUSE
Clustering Docker with Docker Swarm on openSUSEClustering Docker with Docker Swarm on openSUSE
Clustering Docker with Docker Swarm on openSUSE
 
Summary of DockerCon Europe.
Summary of DockerCon Europe. Summary of DockerCon Europe.
Summary of DockerCon Europe.
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
GDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSGDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWS
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016
 
Pp docker-swarm-doxlon-28th-march-2017
Pp docker-swarm-doxlon-28th-march-2017Pp docker-swarm-doxlon-28th-march-2017
Pp docker-swarm-doxlon-28th-march-2017
 
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developers
 
Docker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetupDocker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetup
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Docker
DockerDocker
Docker
 

Último

Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Último (20)

Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

Docker for Fun and Profit, Devoxx 2014

  • 1. Docker for Fun and Profit Carl Quinn Java Posse, Riot Games http://github.com/cquinn/devoxx14 #DV14 #Docker4Fun @cquinn
  • 2. Schedule ➡About Docker ➡Getting Docker ➡Booting to Docker ➡The Docker Daemon ➡Images and Containers ➡Images, Layer by Layer ➡Simple Dockerized Service ➡Containers and Networks ➡Containers and Volumes ➡Linking Containers Together ➡Using cAdvisor ➡Basic Docker Clusters ➡Fleet ➡More: Mesos, Kubernetes #DV14 #Docker4Fun @cquinn
  • 3. About Docker What It Is #DV14 #Docker4Fun @cquinn
  • 12. Containerization vs Virtualization #DV14 #Docker4Fun @cquinn
  • 13. Containerization vs Virtualization #DV14 #Docker4Fun @cquinn
  • 15. About Docker Origins #DV14 #Docker4Fun @cquinn
  • 16. Origins • Google circa 2007 • Linux cgroups (control groups) (resource limits) • Linux namespaces (resource isolation) • Docker circa 2013 • Layered virtual filesystem • One stop shop encapsulating many Linux kernel features #DV14 #Docker4Fun @cquinn
  • 17. About Docker Why It Is So Good #DV14 #Docker4Fun @cquinn
  • 18. Sounds cool, but what’s the big deal? #DV14 #Docker4Fun @cquinn
  • 20. Universal Deployable Artifact • Complete: Everything the app needs is in the artifact. • Small: The artifact is small enough to be easily managed. • Immutable: The contents of the artifact can’t change. • Universal: The artifact can run on any Linux host. • Deployable: The artifact can actually be run directly, without being unpacked or installed. #DV14 #Docker4Fun @cquinn
  • 21. Image Sharing • Universal Images are Easy to Share • https://hub.docker.com/ #DV14 #Docker4Fun @cquinn
  • 22. Getting Docker #DV14 #Docker4Fun @cquinn
  • 23. Home base • https://docker.com/ • Current version: 1.3.1 • Requires 64-bit Linux #DV14 #Docker4Fun @cquinn
  • 24. Docker Environment on Linux • Ubuntu Trusty (14.4) • CentOS 7 • CoreOS https://coreos.com/ 472.0.1 • Other Linux: RedHat, Fedora, Debian, Gentoo, etc • Cloud: AWS, Rackspace, GCE, etc #DV14 #Docker4Fun @cquinn
  • 25. Docker Environment on Mac • boot2docker • and/or: brew install docker • Installs virtual box with a tiny Linux that runs Docker • Docker cmdline client runs on Mac #DV14 #Docker4Fun @cquinn
  • 26. Docker Environment on Windows • boot2docker • Installs virtual box with a tiny Linux that runs the Docker daemon • May have to shell into the VM to work • (I have no direct experience) #DV14 #Docker4Fun @cquinn
  • 27. Booting to Docker Mac Version #DV14 #Docker4Fun @cquinn
  • 29. Client / daemon Comm • Clear vs TLS • Boot2docker now defaults to TLS • Can switch to clear • /var/lib/boot2docker/profile : DOCKER_TLS=no #DV14 #Docker4Fun @cquinn
  • 30. Clear Comm Daemon: /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2375 Client DOCKER_HOST=tcp://192.168.59.103:2375 #DV14 #Docker4Fun @cquinn
  • 31. TLS Comm Daemon /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2376 --tlsverify --tlscacert=/var/lib/boot2docker/tls/ca.pem --tlscert=/var/lib/boot2docker/tls/server.pem --tlskey=/var/lib/boot2docker/tls/serverkey.pem Client DOCKER_HOST=tcp://192.168.59.103:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/Users/cquinn/.boot2docker/certs/ #DV14 #Docker4Fun @cquinn
  • 32. Boot2docker VM • vboxnet2 is mapped to nested Linux VM • My case: tcp://192.168.59.103 #DV14 #Docker4Fun @cquinn
  • 33. Poking around boot2docker boot2docker init boot2docker status boot2docker version boot2docker start boot2docker suspend boot2docker stop boot2docker restart boot2docker ssh docker info docker version #DV14 #Docker4Fun @cquinn
  • 34. The Docker Daemon #DV14 #Docker4Fun @cquinn
  • 35. Docker Client & Daemon #DV14 #Docker4Fun @cquinn
  • 36. The Docker Daemon • Use same binary as cmdline Client • Runs on init or as needed • Does all the work #DV14 #Docker4Fun @cquinn
  • 37. The Docker Daemon • Uses libcontainer to talk to Linux kernel • Starts process group for container • Creates namespaces for process group • Creates cgroups for resource quotas • Controls network access, port mapping • Controls volume mounting #DV14 #Docker4Fun @cquinn
  • 39. Docker Daemon REST API • Docker daemon exposes an HTTP JSON over REST API • See: https://docs.docker.com/reference/api/docker_remote_api/ • Version 1.15 • Normally this is over a local unix socket, but can go over tcp as well. #DV14 #Docker4Fun @cquinn
  • 40. Talk to the Docker Daemon http http://192.168.59.103:2375/v1/_ping http http://192.168.59.103:2375/v1/version http http://192.168.59.103:2375/v1/info http http://192.168.59.103:2375/images/json?all=0 http is HTTPie, a fancy curl https://github.com/jakubroztocil/httpie #DV14 #Docker4Fun @cquinn
  • 41. Images and Containers #DV14 #Docker4Fun @cquinn
  • 42. Images, Registries and Containers • Image is the package of bits (you might think of this as the container, but that’s not exactly right) • repository (think git repo) • tag • ID • Registry is the repository of images • Container is a running self-contained process group • Dockerfile is the Makefile for Docker images #DV14 #Docker4Fun @cquinn
  • 44. docker images docker pull docker inspect docker tag docker push #DV14 #Docker4Fun @cquinn
  • 45. Images, Layer by Layer #DV14 #Docker4Fun @cquinn
  • 46. Image Layers #DV14 #Docker4Fun @cquinn
  • 47. Base Image Examples • debian • busybox • ubuntu • centos • https://registry.hub.docker.co m/_/debian/ • https://registry.hub.docker.co m/_/busybox/ • https://registry.hub.docker.co m/_/ubuntu/ • https://registry.hub.docker.co m/_/centos/ #DV14 #Docker4Fun @cquinn
  • 48. docker history #DV14 #Docker4Fun @cquinn
  • 49. Simple Dockerized Service Example: ticktock #DV14 #Docker4Fun @cquinn
  • 50. ticktock • Very simple Go app that just writes to stdout #DV14 #Docker4Fun @cquinn
  • 51. ticktock … func main() { for i := 0; i < 10000; i++ { if i%2 == 0 { fmt.Printf("Tick %dn", i) } else { fmt.Printf("Tock %dn", i) } time.Sleep(1000 * time.Millisecond) } } #DV14 #Docker4Fun @cquinn
  • 52. Build and run on Mac make clean ticktock ./ticktock #DV14 #Docker4Fun @cquinn
  • 53. Dockerize FROM busybox:ubuntu-14.04 MAINTAINER cquinn ADD ./bin/linux/amd64/ticktock /ticktock CMD /ticktock #DV14 #Docker4Fun @cquinn
  • 54. Dockerize make docker_image docker images docker history docker inspect #DV14 #Docker4Fun @cquinn
  • 56. Containers and Networks Example: webhellogo #DV14 #Docker4Fun @cquinn
  • 57. const CounterFile = "/data/counter" func main() { os.Mkdir("/data", os.ModeDir|0755) web.Get("/", func() string { msg := fmt.Sprintf("Hello Go言語%d!”, readUpdatedCounter()) // (Hello GoLanguage) fmt.Println(msg) return msg }) web.Run(":8080") } #DV14 #Docker4Fun @cquinn
  • 58. func readUpdatedCounter() int { store, _ := ioutil.ReadFile(CounterFile) var i = 0 fmt.Sscanf(string(store), "%d", &i) i++ store = []byte(fmt.Sprintf("%d", i)) ioutil.WriteFile(CounterFile, store, 0755) return i } #DV14 #Docker4Fun @cquinn
  • 59. FROM busybox:ubuntu-14.04 MAINTAINER cquinn ADD ./bin/linux/amd64/webhellogo /webhellogo CMD /webhellogo #DV14 #Docker4Fun @cquinn
  • 60. make docker_image #DV14 #Docker4Fun @cquinn
  • 61. docker run -d -p 9090:8080 --name="webhellogo" cquinn/webhellogo #DV14 #Docker4Fun @cquinn
  • 63. Containers and Volumes Example: webhellogo #DV14 #Docker4Fun @cquinn
  • 64. docker run -d -p 9090:8080 -v /home/docker:/data --name="webhellogo" cquinn/webhellogo #DV14 #Docker4Fun @cquinn
  • 66. Linking Containers Together Example: figgy #DV14 #Docker4Fun @cquinn
  • 67. Linked Containers #DV14 #Docker4Fun @cquinn
  • 68. figgy app.py from flask import Flask from redis import Redis import os app = Flask(__name__) redis = Redis(host="redis_1", port=6379) @app.route('/') def hello(): redis.incr('hits') return 'Hello World! I have been seen %s times.' % redis.get('hits') if __name__ == "__main__": app.run(host="0.0.0.0", debug=True) #DV14 #Docker4Fun @cquinn
  • 69. FROM orchardup/python:2.7 ADD . /code WORKDIR /code RUN pip install -r requirements.txt #DV14 #Docker4Fun @cquinn
  • 70. Fig • Use Fig instead of lots’o bash • http://www.fig.sh/ • https://github.com/docker/fig • http://blog.docker.com/2014/08/getting-started-with-orchestration- using-fig/ #DV14 #Docker4Fun @cquinn
  • 71. figgy’s Fig fig.yml web: build: . command: python app.py ports: - "5000:5000" volumes: - .:/code links: - redis redis: image: orchardup/redis #DV14 #Docker4Fun @cquinn
  • 73. Using cAdvisor Example: cadvisor #DV14 #Docker4Fun @cquinn
  • 76. Extra Credit • Can also hookup InfluxDB + Grafana • http://influxdb.com/ • http://grafana.org/ • Or use Heapster across a cluster • https://github.com/GoogleCloudPlatform/heapster #DV14 #Docker4Fun @cquinn
  • 77. Clusters of Dockers #DV14 #Docker4Fun @cquinn
  • 78. Clustering with Docker • Dockers are black boxes • Config goes into args & env. • Functional I/O is on network ports. • System needs to Solve • configuration delivery • dynamic service addressing #DV14 #Docker4Fun @cquinn
  • 79. Deploy Service Addressing Cluster Docker Configuration #DV14 #Docker4Fun @cquinn
  • 80. Basic Docker Clusters Example: cluster #DV14 #Docker4Fun @cquinn
  • 82. docker cloud-init coreos: units: - name: docker-tcp.socket command: start content: | [Unit] Description=Docker Socket for the API [Socket] ListenStream=2375 Service=docker.service BindIPv6Only=both [Install] WantedBy=sockets.target #DV14 #Docker4Fun @cquinn
  • 83. docker cloud-init (cont) - name: enable-docker-tcp.service command: start content: | [Unit] Description=Enable the Docker Socket for the API [Service] Type=oneshot ExecStart=/usr/bin/systemctl enable docker-tcp.socket #DV14 #Docker4Fun @cquinn
  • 85. Fleet Example: fleet #DV14 #Docker4Fun @cquinn
  • 86. fleet • https://coreos.com/using-coreos/clustering/ • https://coreos.com/docs/launching-containers/ launching/launching-containers-fleet/ #DV14 #Docker4Fun @cquinn
  • 88. fleet cloud-init coreos: etcd: # generate a new token for each unique cluster from https://discovery.etcd.io/new discovery: https://discovery.etcd.io/b6efb8e37cfaafbabaeeca4392d74909 # multi-region and multi-cloud deployments need to use $public_ipv4 addr: $private_ipv4:4001 peer-addr: $private_ipv4:7001 units: - name: etcd.service command: start - name: fleet.service command: start #DV14 #Docker4Fun @cquinn
  • 90. myapp.service [Unit] Description=MyApp After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill busybox1 ExecStartPre=-/usr/bin/docker rm busybox1 ExecStartPre=/usr/bin/docker pull busybox ExecStart=/usr/bin/docker run --name busybox1 busybox /bin/sh -c "while true; do echo Hello World; sleep 1; done" ExecStop=/usr/bin/docker stop busybox1 #DV14 #Docker4Fun @cquinn
  • 92. More: Mesos, Kubernetes #DV14 #Docker4Fun @cquinn
  • 93. Mesos • http://mesos.apache.org/ • https://mesosphere.com/learn/ #DV14 #Docker4Fun @cquinn
  • 95. Kubernetes • Googles next generation “lmctfy” for Docker • https://github.com/GoogleCloudPlatform/kubernetes • Available on GCE #DV14 #Docker4Fun @cquinn
  • 98. Admiral • Our Simple Cluster Manager #DV14 #Docker4Fun @cquinn
  • 99. Admiral Admiral cmdline #DV14 #Docker4Fun @cquinn
  • 100. Links & Credits • Images from • http://www.slideshare.net/dotCloud/docker-intro-november • https://coreos.com/ #DV14 #Docker4Fun @cquinn
  • 101. Docker is the latest hotness in the deployment automation space, and opens a whole new world of opportunities in how we bundle, deploy and manage our running apps. Learn what Docker is all about and how to get started working with it. During this university, you will learn how to get Docker installed and get started using it to build and run your own containers. We'll take Docker apart and see how it works under the hood. Then we'll zoom out and experiment with Fleet and Mesos – interesting technologies built upon Docker for deploying containers to clusters of machines. All the while, we'll talk about how this new technology is poised to radically change how we think about deployment.

Notas del editor

  1. Self-contained complete app, or mini-machine ready to run. Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Encapsulation like a VM image Lean and mean like a tar ball
  2. There are many different kinds of apps and tools and libraries for writing apps, and these come in many flavors and different needs for deployment. What system libraries they need, what language runtimes, etc. And often these libraries can have conflicting versions and other interactions that can be extremely difficult to deal with. At the same time, there are different machine and infrastructure types. Development machines, VMs, internal datacenter or partner / customer datacenter, not to mention all the kinds of public, private and hybrid clouds.
  3. If you lay out the software variables on one axis, and the hardware ones on the other, you get a huge nasty matrix. And, there’s a lot of work to do every time you add one thing to either axis. And there isn’t always a clear separation of responsibility for what the app developers and the devops folks are responsible for.
  4. Back in the day, the cargo industry had the same situation. Every kind of cargo was packed differently and had unique handling requirements. And each leg of the journey for the cargo had its own unique characteristics and cargo equipment.
  5. They too had a huge matrix problem. Moving goods from one place to another required knowing the exact route that the goods would take, and a negotiation with every provider on the way.
  6. That was eventually solved by the introduction of the intermodal shipping container. Really very simple: it was just a big metal box that could be loaded up with anything. The sizes were standardized, as well as was the way they stacked and how they were picked up by cranes. Someone shipping goods from point a to point b now didn’t have to know what modes of transportation were used, and in fact they could change based on needs and prices.
  7. Side note: the shipping container was not a big-bang invention, and not a committee-developed standard. It was an ad-hoc adaption of a de-facto standard mostly introduced and push by one iconoclast entrepreneur, Malcom McLean, who wanted to offer an end-to-end shipping solution. Book: http://www.amazon.com/The-Box-Shipping-Container-Smaller/dp/0691136408
  8. Now in the software world we have the same solution. A container that can hold all kinds of our software cargo, and that can be deployed on any kind of hardware.
  9. And now the matrix looks a whole lot easier. Instead of an N*M problem, it is just N+M.
  10. Virtualization Sits on top of a machine abstraction of some kind Usually have an entire OS in an image Since the machine is big, often multiple apps are still deployed to each
  11. Containerization Sits on top of a Linux host OS and shares the kernel. Very fast. This host can be very minimal. Container has its own copy of all the libs and other files that the deployed app will need.
  12. As apps are built and rebuilt, many shared components can be packaged separately and only the actual app bits updated incrementally.
  13. Docker doesn’t invent any single major thing, but it does package some existing tech in a very easy to use bundle that sets a de-facto standard. Just like the real shipping container.
  14. Certainly this sounds cool, but what’s the big deal? We already have tools that can deal with (most of) this deployment already. And a lot of this tech is not new.
  15. Developers can package complete artifacts for their apps. Deployment systems now have a standard artifact to deploy.
  16. How many in the audience develop on Mac? Windows? Linux?
  17. Here’s a picture of what this boot2docker inception looks like [TODO: redo this picture to show Docker client]
  18. http://enthusiasm.cozy.org/archives/2014/07/docker-4-accessing-a-remote-docker-daemon-using-socatssh
  19. [redo this drawing]
  20. Images are actually built in layers. Like ogres. Or parfaits. Best practices in keeping these layers clean and small: base image install updates install common packages install app Also, not the difference between the Host OS that is hosting Docker, and the Base OS that is the base image in the container.
  21. This example is in cquinn/ticktock
  22. Run the ticktock image. Show ‘docker help run’, some interesting flags: Use -it to run it in foreground. ctrl-c to get out. Use -d to have it daemonize. Kill it later with ‘docker kill’ Use ‘docker ps’ to see it running. Use ‘docker logs -f’ to watch it go. Use ‘docker pause’, show logs, then ‘docker unpause' Use ‘docker stop’ to stop it, ‘docker ps -a’ to see it stopped, then ‘docker rm’ to delete it.
  23. Show ‘docker help run’, some interesting flags: Use -p or -P to map ports. Use ‘docker ps’ to see port mapping, 9090->8080 Curl port to see webhellogo output. Use browser to see webhellogo page.
  24. Pause and unpause, or stop and start container: Counter continues. Stop and rm the container: Now notice that the counter state lived in the container and is lost. Mount some storage: Use -v to mount a host volume to save state Stop, rm, start container Use browser to see webhellogo page, counters still going!
  25. Lets build something like this, but with Python and Redis.
  26. Use fig to build and run figgy: fig up Uses 'docker run —link' Talk about how the port mapping works
  27. Docker containers are nice immutable deployable artifacts, and just need a few things plugged into them when deployed. These are the configuration, and a system for dynamic service discovery.
  28. Fire up CoreOS cluster in AWS with the above clout-init as user data Use local docker cli to talk to multiple CoreOS hosts using -H in dall.sh Use dall.sh to list images, ps containers, etc. Start a container on the multiple hosts. Use dall.sh to see the containers running.
  29. Unit part tells systemd about how this service unit fits in. Service part tells systemd how to start and stop the service.
  30. Show cluster machines: ./fc.sh list-machines Show cluster units: ./fc.sh list-unit-files Show cluster unit states: ./fc.sh list-units fleetctl service control pairs: submit / destroy load / unload start / stop
  31. Mesos has a master / slave architecture. Single master, but with standbys for HA. Zookeeper is used for leader election, but also exposed to frameworks. Schedulers can be added to the master. Executors can be added to the slaves. Bundled together, Schedulers and Executors are Frameworks. Docker support is just one kind of executor