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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be root to execute this script" 2>&1 | |
else | |
PID=$(docker inspect --format "{{ .State.Pid }}" "$1") | |
nsenter --target $PID --mount --uts --ipc --net --pid | |
fi |
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
#!/bin/bash | |
set -e | |
curl -o util-linux_2.24-1~1_amd64.deb "http://ppa.launchpad.net/78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl-launchpad-a811i2i3ytqlsztthjth0svbccw8inm65tmkqp9sarr553jq53in4xm1m/util-linux/ubuntu/pool/main/u/util-linux/util-linux_2.24-1~1_amd64.deb" | |
sudo dpkg --install --ignore-depends=libblkid1,libmount1,libsmartcols1 --force-overwrite util-linux_2.24-1~1_amd64.deb | |
sudo curl -o /usr/local/bin/docker-enter https://gist.githubusercontent.com/lox/d210a74d3c2f317786ab/raw/docker-enter | |
sudo chmod +x /usr/local/bin/docker-enter |
Author
changyuheng
commented
Oct 13, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment