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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
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
370
Cryptography Pitfalls at BSidesPhilly 2016
jtdowney
0
170
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
[BalkanRuby 2026] Drop your app/services!
palkan
3
690
New "Type" system on PicoRuby
pocke
1
190
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
120
inferと仲良くなる10分間
ryokatsuse
1
260
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
150
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
670
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
980
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
120
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
400
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.2k
GitHub Copilot CLIのいいところ
htkym
2
1.1k
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
240
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
AI: The stuff that nobody shows you
jnunemaker
PRO
7
660
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Bash Introduction
62gerente
615
210k
Balancing Empowerment & Direction
lara
6
1.1k
How to Talk to Developers About Accessibility
jct
2
210
Paper Plane (Part 1)
katiecoart
PRO
0
7.9k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
260
Navigating Weather and Climate Data
rabernat
0
200
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
Optimizing for Happiness
mojombo
378
71k
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