Update bash scripts.
This commit is contained in:
parent
d97fea0e94
commit
8e69cd62c3
9 changed files with 24 additions and 71 deletions
13
bash/docker-remote.sh
Normal file
13
bash/docker-remote.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
# A simple aliasing tool for performing remote docker operations over ssh
|
||||
# Usage: dcontrol <somehost.com>
|
||||
# Assumes you have key-based root login
|
||||
|
||||
function dcontrol() {
|
||||
if [ -z $1 ] || [ $1 == "off" ]; then
|
||||
unalias docker 2> /dev/null
|
||||
unset DOCKER_HOST
|
||||
return
|
||||
fi
|
||||
export DOCKER_HOST=$1
|
||||
alias docker="docker -H ssh://root@${DOCKER_HOST}"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue