Skip to content

Instantly share code, notes, and snippets.

@yukinagae
Created October 7, 2014 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukinagae/d7368e15f135a8337171 to your computer and use it in GitHub Desktop.
Save yukinagae/d7368e15f135a8337171 to your computer and use it in GitHub Desktop.
docker attach using nsenter
docker-attach()
{
pid=$(docker inspect --format '{{.State.Pid}}' $1)
sudo nsenter --target $pid --mount --uts --ipc --net --pid
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment