Update bash scripts.

This commit is contained in:
Anna Rose Wiggins 2025-07-30 12:22:46 -04:00
parent d97fea0e94
commit 8e69cd62c3
9 changed files with 24 additions and 71 deletions

13
bash/docker-remote.sh Normal file
View 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}"
}