And squashing is still behind experimental flag after all these years.
Not with Buildah
Which doesn't work on macOS. And which has no caching.
I think it is built into the podman build code as well.
Do it all in Userland with jib cli, doesn’t work for all cases but it’s constraints generally keep you honest.
That only works for Java. Nearly all of the stuff I work on involves native executables as well as the need to setup the OS environment in the container (libraries, user accounts, etc)
Works for lots of examples where you are packaging a statically-ish linked thing into a container, could be node/golang/python/java etc. Def lots of other scenarios where it doesn’t work, but sometimes you can push that to a base image built differently. Keep the majority of things simple, less footguns.
(Edit: I realize most of those aren’t statically linked, better description might be “things copied straight into container, not installed”)
What's a good tool for doing this? I assume that you don't want to merge your custom layers with the base image layer.