]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/docker-machine/docker-machine.plugin.zsh
initial
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / docker-machine / docker-machine.plugin.zsh
1 DEFAULT_MACHINE="default"
2
3 docker-up() {
4     if [ -z "$1" ]
5     then
6         docker-machine start "${DEFAULT_MACHINE}"
7         eval $(docker-machine env "${DEFAULT_MACHINE}")
8     else
9         docker-machine start $1
10         eval $(docker-machine env $1)
11     fi
12     echo $DOCKER_HOST
13 }
14 docker-stop() {
15     if [ -z "$1" ]
16     then
17         docker-machine stop "${DEFAULT_MACHINE}"
18     else
19         docker-machine stop $1
20     fi
21 }
22 docker-switch() {
23     eval $(docker-machine env $1)
24     echo $DOCKER_HOST
25 }
26 docker-vm() {
27     if [ -z "$1" ]
28     then
29         docker-machine create -d virtualbox --virtualbox-disk-size 20000 --virtualbox-memory 4096 --virtualbox-cpu-count 2 "${DEFAULT_MACHINE}"
30     else
31         docker-machine create -d virtualbox --virtualbox-disk-size 20000 --virtualbox-memory 4096 --virtualbox-cpu-count 2 $1
32     fi
33 }