Add docker-enter

pull/261/head
Travis Swicegood 2014-07-18 17:04:20 -05:00 committed by Hector Rivas
parent b1668d6d0d
commit 84b1dd40fb
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