Skip to content

Instantly share code, notes, and snippets.

@mitchwongho
Last active November 29, 2017 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mitchwongho/4292feb9537c3c6fb40f to your computer and use it in GitHub Desktop.
Save mitchwongho/4292feb9537c3c6fb40f to your computer and use it in GitHub Desktop.
Docker: nsenter
$ docker inspect --format {{.State.Pid}} <CONTAINER_PID>
e.g. $ PID=%(docker inspect --format {{.State.Pid}} <CONTAINER PID>)
$ sudo nsenter --target <pid> --mount --uts --ipc --net --pid /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment