Add docker-enter

pull/307/merge
Travis Swicegood 2014-07-18 17:04:20 -05:00
parent d62551348a
commit 6f79c9d760
1 changed files with 5 additions and 0 deletions

View File

@ -5,4 +5,9 @@ about-plugin 'Helpers to get Docker setup correctly for boot2docker'
# of boot2docker, or its configured for a different IP
if [[ `uname -s` == "Darwin" ]]; then
export DOCKER_HOST=tcp://192.168.59.103:2375
docker-enter() {
boot2docker ssh '[ -f /var/lib/boot2docker/nsenter ] || docker run --rm -v /var/lib/boot2docker/:/target jpetazzo/nsenter'
boot2docker ssh -t sudo "/var/lib/boot2docker/docker-enter \"$1\""
}
fi