iximiuz / cdebug

cdebug - a swiss army knife of container debugging
https://iximiuz.com/en/posts/docker-debug-slim-containers/
Apache License 2.0
1.23k stars 47 forks source link

cdebug exec fails for containers with host PID ns #4

Closed iximiuz closed 1 year ago

iximiuz commented 1 year ago

Currently, the cdebug exec implementation uses the hardcoded PID 1 for the /proc/<pid>/root symlink (right before chroot-ing). It seemingly works fine for containers with their own PID namespace since the main's container process is always PID 1. However, the approach isn't good enough for containers that share the host's PID ns since PID 1 will likely be the host's init manager and not one of the container's processes.

iximiuz commented 1 year ago

Fixed in v0.0.4