Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to Docker
Search
John Downey
February 06, 2014
Programming
160
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
170
Cryptography Pitfalls at BsidesMSP 2017
jtdowney
0
210
Cryptography Pitfalls at THOTCON 0x8
jtdowney
0
230
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
320
Debugging TLS/SSL at DevOpsDays Boston
jtdowney
1
400
Other Decks in Programming
See All in Programming
新卒PdEのリアル
ryu1013
1
460
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
130
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
アクセシビリティから考える情報設計
high_g_engineer
0
320
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
110
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
180
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
110
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
信頼性の目標を誰も求めてない
shubox
0
500
業務時間外もAIに働いてもらう話
colorful12
3
10k
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
180
高専キャリア LT 発表内容
crysta1221
6
5.6k
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
840
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
450
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
400
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
340
AI: The stuff that nobody shows you
jnunemaker
PRO
9
980
HDC tutorial
michielstock
2
860
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.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