Created
September 22, 2015 10:11
-
-
Save jonashelgemo/1f896c6095535603f884 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/zsh | |
# | |
set -x | |
container_id="$1" | |
container=$(docker inspect -f '{{ .Name }}' "$container_id" | sed "s/\///") | |
new_ip=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' "$container_id") | |
echo "host-record=$container.dev,$new_ip" > /usr/local/etc/dnsmasq.d/$container.dev.conf | |
sudo launchctl stop homebrew.mxcl.dnsmasq | |
sudo launchctl start homebrew.mxcl.dnsmasq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment