Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Docker: Try to Contain Your Excitement
Search
Tyler Bird
April 24, 2014
Programming
1
110
Docker: Try to Contain Your Excitement
An introduction to the core concepts of docker.
Tyler Bird
April 24, 2014
Tweet
Share
More Decks by Tyler Bird
See All by Tyler Bird
Capistrano: A three act play in multistage deployment strategies.
7hunderbird
1
2.3k
Build a chef-solo Development Environment with Vagrant
7hunderbird
3
2.3k
Using Chef-Solo
7hunderbird
1
2.1k
Rake: Not Your Father's Build Tool
7hunderbird
0
810
Other Decks in Programming
See All in Programming
Zoneless Testing
rainerhahnekamp
0
120
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
510
Beyond ORM
77web
8
1.2k
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
950
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
320
良いユニットテストを書こう
mototakatsu
8
3.1k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
380
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
770
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
200
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
670
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
330
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
180
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Visualization
eitanlees
146
15k
Optimising Largest Contentful Paint
csswizardry
33
3k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.6k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Gamification - CAS2011
davidbonilla
80
5.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Transcript
Hello I’m Tyler Bird
Hello I’m Tyler Bird Work for Engine Yard
Hello I’m Tyler Bird Work for Engine Yard I love
DevOps
Text Docker
Text Docker Just try and contain your excitement
Who creates docker?
Homepage www.docker.io
The Team www.docker.io/team/
Docker on GitHub github.com/dotcloud/ docker/
When did docker arrive?
A Retrospective
A Retrospective Began as dotCloud
A Retrospective Began as dotCloud First commit January 18, 2013
A Retrospective Began as dotCloud First commit January 18, 2013
Version 0.1.0 shipped March 25, 2013
A Retrospective Began as dotCloud First commit January 18, 2013
Version 0.1.0 shipped March 25, 2013 11,400 GitHub stars, 1800+ forks
A Retrospective Began as dotCloud First commit January 18, 2013
Version 0.1.0 shipped March 25, 2013 11,400 GitHub stars, 1800+ forks October 29, 2013 dotCloud becomes Docker
A Retrospective Began as dotCloud First commit January 18, 2013
Version 0.1.0 shipped March 25, 2013 11,400 GitHub stars, 1800+ forks October 29, 2013 dotCloud becomes Docker Version 0.10 latest stable April 8, 2014
Hardware Virtualization
Hardware Virtualization 1966-1972 IBM CP/CMS
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen 2001 IBM AIX LPAR
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen 2001 IBM AIX LPAR 2006 Amazon EC2
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen 2001 IBM AIX LPAR 2006 Amazon EC2 2007 Sun Logical Domains
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen 2001 IBM AIX LPAR 2006 Amazon EC2 2007 Sun Logical Domains 2007 Linux KVM
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen 2001 IBM AIX LPAR 2006 Amazon EC2 2007 Sun Logical Domains 2007 Linux KVM 2007 InnoTek VirtualBox
Hardware Virtualization 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix
VirtualPC 1999 VMWare Workstation 199x-2002 Xen 2001 IBM AIX LPAR 2006 Amazon EC2 2007 Sun Logical Domains 2007 Linux KVM 2007 InnoTek VirtualBox 2008 MS Hyper-V
Process Virtualization
Process Virtualization 1979-1982 UNIX chroot
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo 2001 Linux-VServer
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo 2001 Linux-VServer 2005 Solaris Containers
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo 2001 Linux-VServer 2005 Solaris Containers 2005 OpenVZ
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo 2001 Linux-VServer 2005 Solaris Containers 2005 OpenVZ 2008 Linux LXC
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo 2001 Linux-VServer 2005 Solaris Containers 2005 OpenVZ 2008 Linux LXC 2007+ PAAS: Heroku, Joyent, CloudFoundry
Process Virtualization 1979-1982 UNIX chroot 1998 FreeBSD jail 2001 Parallels
Virtuozzo 2001 Linux-VServer 2005 Solaris Containers 2005 OpenVZ 2008 Linux LXC 2007+ PAAS: Heroku, Joyent, CloudFoundry 2013 Docker
What is docker?
It is a lightweight framework (with a powerful API) that
provides a lifecycle for building and deploying applications into containers.
What is the framework?
Framework Components
Framework Components Layers
Framework Components Layers Containers
Framework Components Layers Containers Registry
Layers
Layers Kernel
Layers Kernel cgroups, namespaces, device mapper
Layers Kernel cgroups, namespaces, device mapper bootfs
Layers Kernel cgroups, namespaces, device mapper bootfs Base image: ubuntu
Layers Kernel cgroups, namespaces, device mapper bootfs Base image: ubuntu
Image: Add emacs
Layers Kernel cgroups, namespaces, device mapper bootfs Base image: ubuntu
Image: Add emacs Image: Add Apache
Layers Kernel cgroups, namespaces, device mapper bootfs Base image: ubuntu
Image: Add emacs Image: Add Apache Writable Container
Layers Kernel cgroups, namespaces, device mapper bootfs Base image: ubuntu
Image: Add emacs Image: Add Apache Writable Container Framework: BUILD
Containers
Containers hold the application
Containers hold the application collection of images
Containers hold the application collection of images run, stop, start,
move, delete
Containers hold the application collection of images run, stop, start,
move, delete an isolated process
Containers hold the application collection of images run, stop, start,
move, delete an isolated process Framework: RUN
Registry
Registry Registry stores images
Registry Registry stores images Layers are tar ball files with
metadata
Registry Registry stores images Layers are tar ball files with
metadata Public / Private
Registry Registry stores images Layers are tar ball files with
metadata Public / Private Community warehouse
Registry Registry stores images Layers are tar ball files with
metadata Public / Private Community warehouse Framework: SHARE
Demo: Command Line
Demo: Command Line sudo%docker%ps% sudo%docker%images
Demo: Command Line sudo%docker%pull%busybox% sudo%docker%run%busybox%/bin/echo%hello%world
Demo: Command Line sudo%docker%run%7i%7t%busybox%sh% sudo%docker%ps%7a
Demo: Command Line sudo%docker%diff%066882d91690%
Docker Architecture Client-server application Can run on the same box
or remotely Communicate through sockets Uses a RESTful API Client sends command Daemon executes command
Dockerfile A set of instructions Simliar to a Makefile or
Vagrantfile Declarative
Demo: Dockerfile
Demo: Dockerfile sudo%docker%run%77name%redis%7d%7hunderbird/redis
Demo: Dockerfile %%%%sudo%docker%run%77link%redis:cli%7i%7t%% % %%%%%%%% % % % %
ubuntu:12.10%/bin/bash
Demo: Dockerfile % % apt7get%update% % % apt7get%7y%install%redis7server% % %
service%redis7server%stop
Demo: Dockerfile % % env%|%grep%DB_% % % redis7cli%7h%$DB_PORT_6379_TCP_ADDR
Trusted Builds Trusted Builds have a number of advantages. For
example, users of your Trusted Build can be certain that the resulting image was built exactly how it claims to be.
Demo: Trusted Builds
Trusted Builds Created a GitHub repo Subfolder = name Dockerfile
goes in there
Trusted Builds Use location if using subfolder Repo name by
purpose Tag name by purpose Create repo
Trusted Builds Check the status https://index.docker.io/ builds/ Tag name by
purpose Create repo
Docker & OpenStack www.youtube.com/ watch?v=jEcousZ6xBU
Credits http://slides.com/stevenborrelli/docker http://www.dockerbook.com/ http://www.docker.com/