Created
October 7, 2014 01:54
-
-
Save yukinagae/d7368e15f135a8337171 to your computer and use it in GitHub Desktop.
docker attach using nsenter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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