Moved boot2docker functionality to its own file. Also added a docker-machine plugin, which sets the same variables for docker-machine.

This commit is contained in:
Nils Winkler
2015-07-16 13:10:38 +02:00
parent 3a07bb75b2
commit 90271980fd
3 changed files with 27 additions and 14 deletions

View File

@@ -1,18 +1,5 @@
cite about-plugin
about-plugin 'Helpers to get Docker setup correctly for boot2docker and to more easily work with Docker'
# Note, this might need to be different if you have an older version
# of boot2docker, or its configured for a different IP
if [[ `uname -s` == "Darwin" ]]; then
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=~/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
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
about-plugin 'Helpers to more easily work with Docker'
function docker-remove-most-recent-container() {
about 'attempt to remove the most recent container from docker ps -a'