docker container size inscrease - cleanup scripts/hints required?

Latest response

All,

I am amazed on how small the official RH OS containers are (only ~150Mb).

I tried using the containers officially provided by RH (e.g. for RH 6.5). Once I install a small thing (e.g. sudo) from same version (no OS upgrade to 6.6 by installing from private repo or DVD), container size increases with much more for no obvious reason. Even after docker-squash -from root, the size is still up from 155Mb to ~300Mb only by adding sudo and small binaries (nodocs), even after including cleanup and flattening (docker-squash with export|import). For cleanup I used https://github.com/docker/docker/blob/master/contrib/mkimage-rinse.sh , etc, yum clean all, quite few rm -rf, the image is still increased a lot more than expected.

Can you point to other official or non-official cleanup methods/scripts used in RH to decrease the size of containers to their real values?

Responses