Last active
February 2, 2016 20:40
-
-
Save ejoubaud/aa6f1eab57832d3ada9c to your computer and use it in GitHub Desktop.
Docker-machine: Update domain name in /etc/hosts, a bash/zsh one-liner
This file contains hidden or 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
mark="# DOCKER_MACHINE:" && sudo sed -i '' "/$mark/d" /etc/hosts && docker-machine ls -q | while read m; do echo "$(docker-machine ip $m) $m.docker ${mark} $m" | sudo tee -a /etc/hosts; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment