News for hackers. Stuff that matters.
Re:Minify your container by mplewis on Wednesday August 03, 2022 @03:52PM (#32336023)
docker-slim is incredibly dangerous and should never be used for a production app.
Re:Minify your container by nicce on Wednesday August 03, 2022 @04:39PM (#32336424)
I guess the question is in which way dangerous? It might lead for crash for sure, but is that crash controlled? If it is, then it is just a crash. Stability vs. minimal attack surface

But I agree, this is just bandaid for lazy bois. Better use Bazel etc. for distroless builds

Re:Minify your container by mplewis on Wednesday August 03, 2022 @06:24PM (#32337259)
This is dangerous in that it strips assets, resources, and files from your app without understanding how they are used.

If you forget a critical code path when you build using Docker-Slim, and a resource file is not used, that resource will be stripped. The feature which depends on it will be broken in production.

Re:Minify your container by bigpod on Wednesday August 03, 2022 @05:15PM (#32336734)
i would disagree i use em in production apps, i configured it and it works if you do it blindly it happens that sometimes things break but if you configure it, it will work
Re:Minify your container by mplewis on Wednesday August 03, 2022 @06:25PM (#32337269)
There is no guarantee that a blind code shaker will leave in everything important while stripping out everything that isn't. How could it possibly know?

If Docker-Slim is working for you in production apps, you are either getting lucky or your app is trivial enough to lack unseen code paths.

Re:Minify your container by tyingq on Wednesday August 03, 2022 @08:56PM (#32338176)
Maybe even unforseen files outside of your app, right?

Like, maybe some log forwarder utility that only gets called for "CRIT" messages that didn't happen to get triggered by testing.