Last active
November 4, 2015 14:25
-
-
Save lalyos/11167958 to your computer and use it in GitHub Desktop.
Fix boot2docker dns - in case changing wifi while b2d is running
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 | |
############################# | |
# curl -L j.mp/b2d-dns|bash | |
############################# | |
boot2docker ssh "sudo sh -c '/bin/cat > /etc/resolv.conf' " <<< "$(cat /etc/resolv.conf | grep nameserver)" | |
boot2docker ssh "sudo ip route flush cache" | |
boot2docker ssh "sudo /etc/init.d/docker restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment