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
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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Tips for Building Lightweight Docker Images
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kelly Andrews
July 21, 2017
Technology
66
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Tips for Building Lightweight Docker Images
Kelly Andrews
July 21, 2017
More Decks by Kelly Andrews
See All by Kelly Andrews
Communications on Fire
kellyjandrews
0
130
Docker: Development to Production
kellyjandrews
0
57
Continuous Testing, Integration, and Deployment for JavaScript Projects
kellyjandrews
0
56
Serverless Concepts
kellyjandrews
1
220
Other Decks in Technology
See All in Technology
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
32
21k
あけおめLINE 傾向とその対策
nasa9084
0
320
「今盗んで、後で解く」に備える ― AWSのポスト量子暗号入門
yama3133
1
210
Vibe Coding で作ったプロダクトをどう安全に動かすか / How to Safely Run Products Built with Vibe Coding
glidenote
0
550
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
140
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.7k
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
150
特殊変数大全
dak2
0
120
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
7
3.7k
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
590
AI感のないAWS構成図をAIエージェントに描かせたい!
sagochiko
1
310
Antigravity SDK for the Java Developer
glaforge
0
190
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
940
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
710
Unsuck your backbone
ammeep
672
58k
4 Signs Your Business is Dying
shpigford
187
23k
Side Projects
sachag
456
43k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Abbi's Birthday
coloredviolet
4
10k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
GitHub's CSS Performance
jonrohan
1033
470k
WCS-LA-2024
lcolladotor
0
830
Transcript
@kellyjandrews Tips for Building Lightweight Docker Images Kelly J Andrews
- Developer Advocate, Codeship
@kellyjandrews Docker Images
@kellyjandrews Docker Images
@kellyjandrews Docker Images What is a docker image
@kellyjandrews Docker Images A Docker image is built up from
a series of layers. Each layer represents an instruction in the image’s Dockerfile. Each layer except the very last one is read-only. Source: docker.com
@kellyjandrews Docker Images FROM ubuntu:15.04 COPY . /app RUN make
/app CMD python /app/app.py
@kellyjandrews Docker Images Source: docker.com
@kellyjandrews Docker Images Source: docker.com
@kellyjandrews Smaller = Better
@kellyjandrews Smaller is Better Large Images = Longer Download Times
Node Latest - 84 sec. Wheezy - 63 sec. Slim - 13 sec. Alpine - 12 sec.
@kellyjandrews Smaller is Better Large Images = More Disk Space
Node Latest 667 MB Wheezy 522 MB Slim 226 MB Alpine 64.7 MB
@kellyjandrews Smaller is Better Large Images = Unused Programs Node
Latest - 786 Wheezy - 719 Slim - 496 Alpine - 329
@kellyjandrews Docker Dieting Tips
@kellyjandrews Docker Dieting Tips Best Practices for Building Minimal Docker
Images https://resources.codeship.com/ebooks
@kellyjandrews Docker Dieting Tips Use Fewer Layers RUN apt-get update
-y RUN apt-get install -y curl RUN apt-get install -y postgresql RUN apt-get install -y postgresql-client
@kellyjandrews Docker Dieting Tips Use Fewer Layers RUN apt-get update
-y && \ apt-get install -y curl postgresql postgresql-client
@kellyjandrews Docker Dieting Tips Clean Up After Yourself RUN apt-get
update -y && \ apt-get install -y curl postgresql postgresql-client && \ rm -rf /var/lib/apt/lists/*
@kellyjandrews Docker Dieting Tips Base Images Node Latest 667 MB
Wheezy 522 MB Slim 226 MB Alpine 64.7 MB
@kellyjandrews Docker Dieting Tips Optimize Dockerignore File root # ls
mycode tmp logs $ echo “tmp” >> .dockerignore $ echo “logs” >> .dockerignore
@kellyjandrews Docker Dieting Tips Jessie Frazelle github.com/jessfraz/dockerfiles