Re:Docker-slim: Minify your Docker container image without c...
by andoriyu on Tuesday December 10, 2019 @07:32PM
(#21758338)
Answer to "How do you debug an issue in a running container?" is "you read logs or you don't."
Generally you build a special debug image that has busybox or whatever. In case of distroless, debug image has busybox and everything that comes with it.
Also, what are you trying to see with top/htop? In ideal world you will see a single process pid 1 that is your entry point. There shouldn't be more than one process running in it.
You can get resource consumption of a container without logging into the container just like you can get running processes without getting into container.
There is nothing else you can do without dragging wholelot of dependencies:
- Anything java related will require a JDK
- Debugging any native code will require a whole debugger
- Debugging python/ruby will either work or will require dev dependencies
Sidenote:
Who the fuck uses ansible to debug containers?
Generally you build a special debug image that has busybox or whatever. In case of distroless, debug image has busybox and everything that comes with it.
Also, what are you trying to see with top/htop? In ideal world you will see a single process pid 1 that is your entry point. There shouldn't be more than one process running in it.
You can get resource consumption of a container without logging into the container just like you can get running processes without getting into container.
There is nothing else you can do without dragging wholelot of dependencies:
- Anything java related will require a JDK
- Debugging any native code will require a whole debugger
- Debugging python/ruby will either work or will require dev dependencies
Sidenote: Who the fuck uses ansible to debug containers?