Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I recommend avoiding this kind of thinking, which leads to bundling all sorts of stuff in every single container. My philosophy is that images should contain as little as possible.

To debug a container, a better way is to enter the container's kernel namespaces using a tool such as nsenter [1]. Then you can use all your favourite tools, but still access the container as if you're inside it. Of course, this means accessing it on the same host that it's running.

If you're on Kubernetes, debug containers [2] are currently in beta, and should be much nicer to work with, as you can do just "kubectl debug" to start working with an existing pod.

[1] https://man7.org/linux/man-pages/man1/nsenter.1.html

[2] https://kubernetes.io/docs/tasks/debug-application-cluster/d...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: