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
3
140
Introduction to Docker
Given at the first Chicago Docker meetup
John Downey
February 06, 2014
Tweet
Share
More Decks by John Downey
See All by John Downey
Cryptography Pitfalls at CactusCon 2019
jtdowney
0
150
Intro to Cybersecurity Workshop
jtdowney
0
120
Cryptography Pitfalls at BsidesMSP 2017
jtdowney
0
160
Cryptography Pitfalls at THOTCON 0x8
jtdowney
0
160
Cryptography Pitfalls at ConFoo Montreal 2017
jtdowney
1
340
Cryptography Pitfalls at BSidesPhilly 2016
jtdowney
0
140
Cryptography Pitfalls at LASCON 2016
jtdowney
0
190
Debugging TLS/SSL at DevOps Days Detroit 2016
jtdowney
1
210
Debugging TLS/SSL at DevOpsDays Boston
jtdowney
1
300
Other Decks in Programming
See All in Programming
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Macとオーディオ再生 2024/11/02
yusukeito
0
370
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
YesSQL, Process and Tooling at Scale
rocio
169
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Six Lessons from altMBA
skipperchong
27
3.5k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
The Invisible Side of Design
smashingmag
298
50k
Documentation Writing (for coders)
carmenintech
65
4.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
We Have a Design System, Now What?
morganepeng
50
7.2k
Teambox: Starting and Learning
jrom
133
8.8k
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