Skip to content

Instantly share code, notes, and snippets.

@lalyos
Last active November 4, 2015 14:25
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lalyos/11167958 to your computer and use it in GitHub Desktop.
Save lalyos/11167958 to your computer and use it in GitHub Desktop.
Fix boot2docker dns - in case changing wifi while b2d is running
#!/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