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
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
200
Intro to Cybersecurity Workshop
jtdowney
0
150
Cryptography Pitfalls at BsidesMSP 2017
jtdowney
0
200
Cryptography Pitfalls at THOTCON 0x8
jtdowney
0
210
Cryptography Pitfalls at ConFoo Montreal 2017
jtdowney
1
370
Cryptography Pitfalls at BSidesPhilly 2016
jtdowney
0
160
Cryptography Pitfalls at LASCON 2016
jtdowney
0
220
Debugging TLS/SSL at DevOps Days Detroit 2016
jtdowney
1
290
Debugging TLS/SSL at DevOpsDays Boston
jtdowney
1
370
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
100
10 Tips of AWS ~Gen AI on AWS~
licux
5
410
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
140
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
0
190
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
240
Kingdom of the Machine
yui_knk
2
340
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
500
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
520
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
430
JOAI2026 1st solution - heron0519 -
heron0519
0
140
Coding as Prompting Since 2025
ragingwind
0
830
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
260
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
100
Optimizing for Happiness
mojombo
378
71k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
760
For a Future-Friendly Web
brad_frost
183
10k
Writing Fast Ruby
sferik
630
63k
Color Theory Basics | Prateek | Gurzu
gurzu
0
290
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
A designer walks into a library…
pauljervisheath
211
24k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.1k
Done Done
chrislema
186
16k
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