CentOS / sig-cloud-instance-images

CentOS cloud images
781 stars 563 forks source link

Save about 14MB of image size #155

Open aleksey-mashanov opened 4 years ago

aleksey-mashanov commented 4 years ago

Running rpm --rebuilddb before generating tar archive will save about 14MB of image size.

$ docker run -it --rm centos:7
[root@97deac1d468c /]# du -hs /var/lib/rpm
22M /var/lib/rpm
[root@97deac1d468c /]# rpm --rebuilddb
[root@97deac1d468c /]# du -hs /var/lib/rpm
8.4M    /var/lib/rpm
TommiFore commented 4 years ago

Thank you @aleksey-mashanov for mentioning command, which I didn't know. This saved 87 MB from our image.