Created
January 21, 2014 04:19
-
-
Save neeravkumar/8534397 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
if ! VBoxManage showvminfo $(VBoxManage list vms|grep dvm|awk '{print $1}'|tr -d '"')|grep -q running | |
then | |
VBoxManage startvm $(VBoxManage list vms|grep dvm|awk '{print $1}'|tr -d '"') --type headless | |
ssh docker@localhost -p 2222 -i ~/.vagrant.d/insecure_private_key "sudo ifconfig eth1 10.1.2.3" | |
fi | |
# run VBoxManage modifyvm $(VBoxManage list vms|grep dvm|awk '{print $1}'|tr -d '"') --natpf1 "docker,tcp,127.0.0.1,4243,,4243" once for below | |
export DOCKER_HOST=tcp://127.0.0.1:4243 | |
/usr/local/bin/docker $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment