-
-
Save nyarla/8294369 to your computer and use it in GitHub Desktop.
(OBSOLETED) This code is no longer maintenance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
address=192.168.20.129 | |
running=`echo -n $(nmap ${address} -p 4243) | grep 'close' | grep '4243/tcp'` | |
if [ ! -z "${running}" ]; then | |
ssh docker@${address} <<EOF | |
sudo /usr/local/etc/init.d/docker stop | |
sudo sh -c "/usr/local/bin/docker -H tcp://${address}:4243 -d > /var/lib/docker/docker.log 2>&1 &" | |
exit | |
EOF | |
fi | |
export DOCKER_HOST=${address} | |
docker $* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment