Skip to content

Instantly share code, notes, and snippets.

@tazjin
Created September 4, 2014 09:24
Show Gist options
  • Save tazjin/370b04c5736da0f63ee8 to your computer and use it in GitHub Desktop.
Save tazjin/370b04c5736da0f63ee8 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Usage: denter <container-name>";
echo "Might require super-user privileges";
exit 1;
fi
DOCKER_PID=$(docker inspect --format "{{ .State.Pid }}" $1)
nsenter --target $DOCKER_PID --mount --uts --ipc --net --pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment