This file contains hidden or 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 | |
# Enter a running Docker container using either nsinit(preferred) or nsenter | |
# You can specify one or the other if desired. | |
# See | |
# http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/ | |
# https://github.com/jpetazzo/nsenter | |
# https://gist.github.com/ubergarm/ed42ebbea293350c30a6 for compiling nsinit | |
[[ -n "$1" ]] || { echo "Usage: `basename $0` <container ID or name> [nsinit|nsenter]. Defaults to nsinit if available."; exit 0; } |