Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base image size lint #109

Open
TLATER opened this issue Apr 6, 2021 · 0 comments
Open

Base image size lint #109

TLATER opened this issue Apr 6, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@TLATER
Copy link

TLATER commented Apr 6, 2021

One of my personal pet-peeves is images using FROM ubuntu, since this image usually contains far more than its dependant could even think to use and seriously clogs up /var in disk-size restrained environments.

While this is hard to detect when included transitively, and of course not always a mistake, I'd argue that it is bad practice to use large dependency images when not necessary. This is easily overlooked, especially by newcomers. Many base images even support alpine tags that should almost always be used, but are rarely the default.

This is also in line with some of the other suggested lints, which suggest installing only "necessary" packages, a rule that is almost always broken simply by depending on the ubuntu image.

Maybe it would be feasible to detect when a base image is larger than, say, 100MB, possibly by checking with a registry/local docker daemon/podman at run time?

@TLATER TLATER added the enhancement New feature or request label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant