Closed TJM closed 5 years ago
After adding the && yum clean all
...
$ docker images | grep puppet-dev-tools
tommythekid/puppet-dev-tools latest 4c270f1497a4 14 minutes ago 1.1GB
puppet/puppet-dev-tools latest 02287227c5bf 11 days ago 1.42GB
Not huge, but still over 320MB smaller... and there is still room for improvement based on the following:
$ CI=true dive tommythekid/puppet-dev-tools
Fetching image... (this can take a while with large images)
Parsing image...
Analyzing image...
efficiency: 90.3114 %
wastedBytes: 160070291 bytes (160 MB)
userWastedPercent: 14.5564 %
Run CI Validations...
Using default CI config
FAIL: highestUserWastedPercent: too many bytes wasted, relative to the user bytes added (%-user-wasted-bytes=0.14556405872910816 > threshold=0.1)
SKIP: highestWastedBytes: rule disabled
PASS: lowestEfficiency
Result:FAIL [Total:3] [Passed:1] [Failed:1] [Warn:0] [Skipped:1]
A few package cleanup improvements...
~Do not use
rpm
directly to add or remove packages.yum install
can handle URLs and prevents the STDERR "rpm database has been modified outside of yum"~ (upon further investigation, the URL is not a simple file, and thusyum localinstall
ignores it. (further investigation required)Any place that
yum
is used, follow up with&& yum clean all
(in the same "RUN" command)~gem probably also has a cache that can be cleaned up~ (this turns out to not be significant)