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
Kelly Andrews
July 21, 2017
Technology
74
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
64
Continuous Testing, Integration, and Deployment for JavaScript Projects
kellyjandrews
0
60
Serverless Concepts
kellyjandrews
1
230
Other Decks in Technology
See All in Technology
セキュリティ専任チームなしで攻撃を先回りするSREが実践したSIEM on Amazon OpenSearch Service
cscengineer
PRO
0
240
リアクションエンジニア ― 小さなリアクションから、話しかけやすい組織をつくる ―
ryuguyana
1
130
Copilot Coworkで「みのるん式」やってみた
minorun365
PRO
2
1.5k
kintoneで在庫管理システムを作るときの要件定義・設計ポイント
kai0707
0
230
コードレビューをなくして見えたもの
henteko
0
130
生き様としてのSRE
hokkai7go
1
170
re:Invent2026 事前勉強会 歴史と愉しみ方10分LT編
toshi_atsumi
0
130
AIに任せられるFlutterコードベースを作る 〜仕様をコードで表し、ハーネスで守る〜
myohei
1
630
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
1
120
公共システムAdventCalendar2026
toru_kubota
0
200
E2Eってつらくないですか?E2Eの管理コストを下げる手段とその実践
akaboshinit
6
3k
AIエージェント統制はAPIから——押さえるべき5つの要素
nagix
0
120
Featured
See All Featured
Docker and Python
trallard
47
4.3k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
600
Agile that works and the tools we love
rasmusluckow
331
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
The Curious Case for Waylosing
cassininazir
1
610
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Navigating Weather and Climate Data
rabernat
0
580
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Paper Plane
katiecoart
PRO
5
55k
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