nsenter
The nsenter tool is part of the util-linux package since version 2.23. It provides access to the namespace of another process. nsenter requires root privileges to work properly. Unfortunately, util-linux is still at version 2.20 in Ubuntu 14.04.
To install the latest version (2.24) proceed as follows:
cd /tmp curl https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz | tar -zxf- cd util-linux-2.24 ./configure --without-ncurses make nsenter cp nsenter /usr/local/bin |
docker inspect --format "{{ .State.Pid }}" <container-id> |
nsenter --target $PID --mount --uts --ipc --net --pid
No comments:
Post a Comment