Skip to content

Instantly share code, notes, and snippets.

@schuster-rainer
Created October 9, 2018 07:44
Show Gist options
  • Save schuster-rainer/cc7a32bd91b8e5939ef2807504d2de42 to your computer and use it in GitHub Desktop.
Save schuster-rainer/cc7a32bd91b8e5939ef2807504d2de42 to your computer and use it in GitHub Desktop.
dns for resolving docker hostnames
#!/bin/bash
# https://stackoverflow.com/questions/37242217/access-docker-container-from-host-using-containers-name
docker run --hostname dns.mageddo --name dns-proxy-server -p 5380:5380 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/resolv.conf:/etc/resolv.conf \
defreitas/dns-proxy-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment