Hacker News new | ask | show | jobs
by adamtulinius 42 days ago
Maybe it's a good reminder to _not_ bundle an entire OS in a Docker image
2 comments

FWIW, the base images they're talking about do not contain an entire OS. In fact, they're lacking a colossal amount of the most basic stuff that qualifies as 'an entire OS'. In many cases, your base images are 'a program to install more stuff if you need it', a shell, and coreutils.
For debugging image it's sometimes nice to be able to actually do stuff in the container, but for production image I'd agree.
Some tricks:

docker run -it --rm --pid=container:myapp --network=container:myapp --cap-add SYS_PTRACE nicolaka/netshoot

kubectl debug -it pod-name --image=nicolaka/netshoot

And that's why Docker images are terrible as a packaging format. No sane packaging format should ever prevent software composition.