dock - Docker™ docking facility
Tired to eval $(docker-machine env MyMachine)
?
Let's try $ dock MyMachine
What if MyMachine has net been created with Docker Machine ?
Let's assume that 1.2.3.4
is the IP address of the targeted Docker host, put the following in ~/.dock/MyMachine
... :
export DOCKER_MACHINE_NAME="MyMachine"
export DOCKER_HOST="tcp://1.2.3.4:2375"
... then :
$ dock MyMachine
Enjoy!
Adapt to your own environment
$ cd /opt
$ git clone https://github.com/gwallet/dock.git
- cd /path/to/man/man1
- ln -s /path/to/dock/man/dock.1 dock.1
Example:
$ cd /usr/local/share/man/man1
$ ln -s /opt/dock/man/dock.1 dock.1
cd /path/to/etc/bash_completion.d
ln -s /path/to/dock/bash/completion/dock dock
Example:
$ cd /usr/local/etc/bash_completion.d
$ ln -s /opt/dock/bash/completion/dock dock
cd ~/.oh-my-zsh/custom/plugins
ln -s /path/to/dock/zsh/plugin dock
- edit
~/.zshrc
and activate the plugin dock
Example:
$ cd ~/.oh-my-zsh/custom/plugins
$ ln -s /opt/dock/zsh/plugin dock
$ vi ~/.zshrc
[...]
plugins=([...] dock)
[...]
$ exit
$ dock TARGET
$ man dock