DEV Community

Which package is bloating your Docker image? (opens in new tab)

layer-blame is git blame for image layers — it names the package responsible for every byte. Here's what it prints when you point it at a stock Alpine image: $ docker save alpine:3.20 -o alpine.tar $ layer-blame alpine.tar Image total: 8.4 MB across 1 layers · package attribution: 100% Layer 0 8.4 MB ADD alpine-minirootfs-3.20.10-aarch64.tar.gz / 4.8 MB libcrypto3 pkg ← largest line highlighted 911.7 KB libssl3 pkg 906.0 KB busybox pkg 706.5 KB musl pkg 327.1 KB apk-tools pkg Every byte in th...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help