Open aleksey-mashanov opened 4 years ago
Running rpm --rebuilddb before generating tar archive will save about 14MB of image size.
rpm --rebuilddb
$ 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
Thank you @aleksey-mashanov for mentioning command, which I didn't know. This saved 87 MB from our image.
Running
rpm --rebuilddb
before generating tar archive will save about 14MB of image size.