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
Tips for Building Lightweight Docker Images
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kelly Andrews
July 21, 2017
Technology
59
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
51
Continuous Testing, Integration, and Deployment for JavaScript Projects
kellyjandrews
0
53
Serverless Concepts
kellyjandrews
1
210
Other Decks in Technology
See All in Technology
ソフトウェアアーキテクチャ研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
2
1k
AI エージェント時代のデジタルアイデンティティ
fujie
1
1.2k
AI Agent を本番環境へ―― Microsoft Foundry × Azure Serverless で作る Enterprise-Ready な基盤
shibayan
PRO
1
860
運用を犠牲にせずコストを制御し事業成長を支える B2B SaaS ID管理基盤におけるS3 Tableのログストレージ活用
kaminashi
1
110
書籍セキュアAPIについて
riiimparm
0
390
AIで楽になるはずが、なぜ疲れる?
kinopeee
0
140
データと地図で読む 大井町の「かわるもの、かわらないもの」
yoshiyama_hana
0
670
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
セキュリティ研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
31
26k
AIエージェントの知識表現と推論に なぜグラフが使われるのか - 記号的AIの復権とニューラルAIとの統合
yohei1126
1
210
データエンジニアこそ組織のオントロジーに向き合うべき — 問いに答えるAIから、事業を動かすAIへ
gappy50
4
2.2k
脱Jenkins、インターン生が挑んだCIツールGitHubActions移行
mixi_engineers
PRO
1
260
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.3k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
500
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
430
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
350
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Fireside Chat
paigeccino
42
4k
The Invisible Side of Design
smashingmag
301
52k
The SEO identity crisis: Don't let AI make you average
varn
0
520
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
430
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
4 Signs Your Business is Dying
shpigford
187
22k
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