As for the status quo, I spend a lot of time extracting dumps from things in containers and debugging weird issues which is really really difficult without the ability to install any tools on the container at will. When done, we blast the container and let kubernetes reschedule a new one, disposing of all tools and state.
On bloat, mine are sitting on top of a debian container layer, mostly because it’s a hell of a lot easier dealing with some dynamic libraries than fecking around with static linking stuff and copying dependencies into a minimalist container.
Edit: There is overlap between these two things which nsenter may not be able to solve looking at what I am reading.
† https://kubernetes.io/docs/tasks/debug-application-cluster/d...
In theory. In practice this is only rarely the case.
But I don't aim for minimal images. Using alpine and installing what ever you like without worrying about all the bullshit to make caches stay empty still results in images only a few megs, don't need to do much better than that.
Though I tend to agree, if you're talking about a compiled language. Static binary and there is little need for anything other than `from scratch`.
I'm always a bit curious why more people don't talk about using nsenter in the rare situation they need to inspect stuff in a running container?
For a production microservice container, why have a bunch of bloat in the container that increases the surface area to manage while also only actually being used in edge cases?