-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
build: new container images for minimal alpine runtime #5367
base: main
Are you sure you want to change the base?
Conversation
mmmm maintaining more images is a lot of maintenance; we will have to think about this. |
for this commit, image sizes: debian = 812.08 MB alpine = 647.28 MB alpine-slim-terraform = 209.72 MB alpine-slim-tofu = 204.51 MB Signed-off-by: Drew Paettie <[email protected]>
7e612d4
to
ab0004d
Compare
I agree with @jamengual. I don't see any need for this. I've commented on the issue. |
yeah, I also feel so, adding more images in the core feels unnecessary. |
As additional quantification for the value add, here is the current vulnerability state, with the only change from main being the removal of old tofu or terraform bins:
This report was generated with trivy. I can remove the bins in a downstream image like:
However this doesn't really solve the problem; We still have to transfer the layers with all the bins on them, and then an additional layer which removes the bins. Additionally deep scanning of this built image will still reveal layers with the CVES on them. Also there is unnecessary bin duplication present it would seem; e.g. terraform 1.10.5 is present in 2 bins:
instead of binary duplication, if we really do need the second bin, it should probably be a simlink |
I understand risk of additional maintenance (why I noted it in the original issue). However I have implemented this in a way where there is virtually no duplication of effort needed; effectively all the same Docker layers are used from current and the test case variance is minimal. I'd be happy to take on the maintenance of this so I don't have to spend time maintaining a fork for this image. |
Still not convinced me. You can easily use a multi-stage Dockerfile to completely remove the files. |
what
why
tests
I have tested my changed by building them locally and asserting non-zero exit code to build. I added make commands to facilitate this task.
For this commit, image sizes when built using the new make commands:
debian = 812.08 MB
alpine = 647.28 MB
alpine-slim-terraform = 209.72 MB
alpine-slim-tofu = 204.51 MB
references
closes #5366