dive icon indicating copy to clipboard operation
dive copied to clipboard

Check for known types of leftover files in efficiency test (eg logs, APT cache)

Open edmorley opened this issue 7 years ago • 1 comments

The efficiency test currently checks whether files were removed in the wrong layer or duplicated, however it would be great if it also identified files that could be removed from the final image entirely.

For example:

  • A subset of the files under /var/cache/apt/
  • /var/lib/apt/lists/*
  • /var/log/*
  • ...and possibly others like man pages and docs

The file/directory lists here (which are used for generating the "slim" docker image variants) might be a good starting point: https://github.com/debuerreotype/debuerreotype/blob/master/scripts/.slimify-excludes

edmorley avatar Nov 26 '18 11:11 edmorley

This doesn't really fit under the efficiency score (since that is a measure of duplicated files) but I think identifying files that can be removed wouldn't be a bad idea. I think the bottom left pane may be reworked/enhanced to indicate more than just files wasting space.. However, I'm considering making generic validators that could be used in a CI pipeline (#74 ). In general the output (both the UI and in a CI context) should indicate which files failed validation and why.

wagoodman avatar Dec 08 '18 18:12 wagoodman