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
Introduction to Docker
Search
John Downey
February 06, 2014
Programming
150
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Docker
Given at the first Chicago Docker meetup
John Downey
February 06, 2014
More Decks by John Downey
See All by John Downey
Cryptography Pitfalls at CactusCon 2019
jtdowney
0
210
Intro to Cybersecurity Workshop
jtdowney
0
160
Cryptography Pitfalls at BsidesMSP 2017
jtdowney
0
210
Cryptography Pitfalls at THOTCON 0x8
jtdowney
0
220
Cryptography Pitfalls at ConFoo Montreal 2017
jtdowney
1
380
Cryptography Pitfalls at BSidesPhilly 2016
jtdowney
0
170
Cryptography Pitfalls at LASCON 2016
jtdowney
0
230
Debugging TLS/SSL at DevOps Days Detroit 2016
jtdowney
1
310
Debugging TLS/SSL at DevOpsDays Boston
jtdowney
1
390
Other Decks in Programming
See All in Programming
霧の中の代数的エフェクト
funnyycat
1
400
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
270
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
490
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
0
280
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
140
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
110
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
初めてのKubernetes 本番運用でハマった話
oku053
0
130
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
Making the Leap to Tech Lead
cromwellryan
135
10k
Paper Plane (Part 1)
katiecoart
PRO
1
9.7k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
エンジニアに許された特別な時間の終わり
watany
108
250k
Odyssey Design
rkendrick25
PRO
2
730
How GitHub (no longer) Works
holman
316
150k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
320
Transcript
John Downey | @jtdowney
None
None
Laptop CI QA Staging Prod Rails code ? ? ?
? ? PostgreSQL ? ? ? ? ? RabbitMQ ? ? ? ? ? libxyz ? ? ? ? ?
http://www.flickr.com/photos/neonman/1438473495/
LXC Linux Containers
LXC: LINUX CONTAINERS • Linux host (kernel >= 2.6.29) •
Linux container (guest) • Must match host architecture • No need to match kernel/distro
DOCKER • Builds on LXC • Server (host) mode requires
Linux and LXC • Recommend kernel >= 3.8 • Client mode runs almost anywhere (Linux/OS X)
WHAT DOCKER ADDS • Images • Layers • Tags •
Repository • Create and share images
DOCKER COMMAND • Written in Go • Open source •
Manages containers and images • Provides HTTP API • Built in CLI client uses API
ADVANTAGES OVER A VM • Package a run-time environment •
Runnable on any linux host • Keeps things isolated and ephemeral • Fast and simple
IMAGES
IMAGES VS CONTAINERS • Images are a template • File
system • Metadata (ports to expose, command to run) • Containers are what is running
IMAGE LAYERS • Images are built up from layers •
Each layer is read-only filesystem • Top layer is a new read-write layer
None
IMAGE HIERARCHY • Form a directed tree • Each image
can specify a parent image • Starts with the parents layers below its own
Ubuntu App A B C DB A B
WAYS TO MAKE IMAGES • Commit a running container (docker
commit) • Dockerfile (docker build) • Import a tarball (docker import)
DOCKERFILE • FROM - What my parent image is •
RUN - Perform a command to prepare the image • ADD - Add a file to the image • EXPOSE - Allow access to a specified port • ENV - Set an environment variable • CMD - Default command to run on container creation
FROM wheezy-base ! ENV DEBIAN_FRONTEND noninteractive ! RUN apt-get install
-y ruby1.9.1 ruby1.9.1-dev RUN apt-get install -y build-essential RUN apt-get install -y libpq-dev RUN apt-get install -y libxml2-dev libxslt-dev RUN apt-get install -y libcurl4-openssl-dev RUN gem install bundler ! EXPOSE 3000 ! WORKDIR /gateway ADD . /gateway/ RUN bundle install ! CMD ["bundle", "exec", "rails", "server", "thin"]
REPOSITORY / INDEX
None