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
160
Intro to Cybersecurity Workshop
jtdowney
0
120
Cryptography Pitfalls at BsidesMSP 2017
jtdowney
0
160
Cryptography Pitfalls at THOTCON 0x8
jtdowney
0
170
Cryptography Pitfalls at ConFoo Montreal 2017
jtdowney
1
340
Cryptography Pitfalls at BSidesPhilly 2016
jtdowney
0
150
Cryptography Pitfalls at LASCON 2016
jtdowney
0
190
Debugging TLS/SSL at DevOps Days Detroit 2016
jtdowney
1
230
Debugging TLS/SSL at DevOpsDays Boston
jtdowney
1
310
Other Decks in Programming
See All in Programming
AIプログラミング雑キャッチアップ
yuheinakasaka
19
4.8k
ML.NETで始める機械学習
ymd65536
0
230
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
930
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
990
Unity Android XR入門
sakutama_11
0
180
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
300
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
120
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
210
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.1k
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
260
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
Jasprが凄い話
hyshu
0
180
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Navigating Team Friction
lara
183
15k
How to Ace a Technical Interview
jacobian
276
23k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
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