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
68
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
140
Docker: Development to Production
kellyjandrews
0
58
Continuous Testing, Integration, and Deployment for JavaScript Projects
kellyjandrews
0
58
Serverless Concepts
kellyjandrews
1
220
Other Decks in Technology
See All in Technology
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
900
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
110
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
180
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
140
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
110
その Valkey 使いこなしていますか?
onk
PRO
5
920
DGX Spark でどこまでハッキングができるのか?
kash1064
2
1.2k
Running Kotlin + Quarkus with Lambda
nealle
1
1.1k
夫婦で子育てするための育児標準化
codmoninc
PRO
0
210
しろおびから始める!ログ活用の第一歩
shumei_ito
0
930
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
750
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Typedesign – Prime Four
hannesfritz
42
3.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
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