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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kelly Andrews
July 21, 2017
Technology
0
49
Tips for Building Lightweight Docker Images
Kelly Andrews
July 21, 2017
Tweet
Share
More Decks by Kelly Andrews
See All by Kelly Andrews
Communications on Fire
kellyjandrews
0
130
Docker: Development to Production
kellyjandrews
0
47
Continuous Testing, Integration, and Deployment for JavaScript Projects
kellyjandrews
0
46
Serverless Concepts
kellyjandrews
1
200
Other Decks in Technology
See All in Technology
社内レビューは機能しているのか
matsuba
0
150
ReactのdangerouslySetInnerHTMLは“dangerously”だから危険 / Security.any #09 卒業したいセキュリティLT
flatt_security
0
320
Postman v12 で変わる API開発ワークフロー (Postman v12 アップデート) / New API development workflow with Postman v12
yokawasa
0
140
【Oracle Cloud ウェビナー】【入門編】はじめてのOracle AI Data Platform - AIのためのデータ準備&自社用AIエージェントをワンストップで実現
oracle4engineer
PRO
1
170
身体を持ったパーソナルAIエージェントの 可能性を探る開発
yokomachi
1
130
Lambda Web AdapterでLambdaをWEBフレームワーク利用する
sahou909
0
180
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
200
Google系サービスで文字起こしから勝手にカレンダーを埋めるエージェントを作った話
risatube
0
190
Kiro Powers 入門
k_adachi_01
0
120
楽しく学ぼう!ネットワーク入門
shotashiratori
1
480
2026-03-11 JAWS-UG 茨城 #12 改めてALBを便利に使う
masasuzu
2
400
品質を経営にどう語るか #jassttokyo / Communicating the Strategic Value of Quality to Executive Leadership
kyonmm
PRO
2
570
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
560
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
230
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Deep Space Network (abreviated)
tonyrice
0
92
We Are The Robots
honzajavorek
0
200
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
690
Exploring anti-patterns in Rails
aemeredith
2
290
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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