Closed stp-ip closed 10 years ago
Removed cleanup command and reassured tabs are used.
I think the 7MB is coming entirely from /var/lib/apt/lists
- I've run some tests locally with a container and using docker diff <container>
to check what's changed, and /var/cache/apt
is created, but nothing in it ever sticks around after the apt-get install
completes.
root@45a24dc9b5db:/# du -hs /var/lib/apt/lists
8.0M /var/lib/apt/lists
Cache doesn't keep things around most of the time. I added it for rare edge cases and to show more general best practices. But if need be I can edit it out.
So, the Debian images all have this: https://github.com/docker/docker/blob/1aa67071cb3e6bc8a08f662d913cdb1b1eda1645/contrib/mkimage/debootstrap#L82-L83
Don't Dir::Cache::pkgcache
and Dir::Cache::srcpkgcache
essentially disable the cache entirely?
@tianon so your take would be to just remove the cache removal anyway?
Yeah, since it isn't really buying us anything like the lists removal does.
Pushed the latest change and squashed all commits.
LGTM
LGTM
Thanks :smile:
Reduces image sizes by another 7 MB each.