Skip to content

Instantly share code, notes, and snippets.

@bbhoss
Last active March 22, 2017 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbhoss/b2af48ba6426568b51da25fc93c4896c to your computer and use it in GitHub Desktop.
Save bbhoss/b2af48ba6426568b51da25fc93c4896c to your computer and use it in GitHub Desktop.
# bash <(curl -s https://gist.githubusercontent.com/bbhoss/b2af48ba6426568b51da25fc93c4896c/raw/15b978487149d5ea478fb1597e9a5771d70f024a/minikube_test.sh)
# ----------------------
# installing dnsmasq and enable daemon
# ----------------------
brew install dnsmasq
# ----------------------
# adding resolver for test domain
# ----------------------
[ -d /etc/resolver ] || sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
# ----------------------
# configuring dnsmasq
# ----------------------
mkdir -p $(brew --prefix)/etc/
cat > $(brew --prefix)/etc/dnsmasq.conf <<-EOF
listen-address=127.0.0.1
address=/minikube.test/$(minikube ip)
# keep nameserver order of resolv.conf
strict-order
EOF
# ----------------------
# launching dnsmasq
# ----------------------
sudo brew services start dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment