Skip to content

Instantly share code, notes, and snippets.

@lestrrat
Created October 10, 2014 00:19
Show Gist options
  • Save lestrrat/5f6be44386a28f184ff6 to your computer and use it in GitHub Desktop.
Save lestrrat/5f6be44386a28f184ff6 to your computer and use it in GitHub Desktop.
ADDR=$(docker inspect $CONTAINER_NAME | perl -ne '/"IPAddress": "([^"]+)"/ && print "$1\n"')
echo "host-record=$CONTAINER_NAME,$ADDR" > /etc/dnsmasq.d/docker-$CONTAINER_NAME
service dnsmasq restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment