Skip to content

Instantly share code, notes, and snippets.

@mathroc
Last active August 29, 2015 14:12
Show Gist options
  • Save mathroc/a6089f04e69d6f835c75 to your computer and use it in GitHub Desktop.
Save mathroc/a6089f04e69d6f835c75 to your computer and use it in GitHub Desktop.
Reverse proxy for docker container
docker run -d --restart=always -v /var/run/docker.sock:/tmp/docker.sock:ro --name reverseproxy -p 80:80 jwilder/nginx-proxy
docker run -d --restart=always -v /var/run/docker.sock:/tmp/docker.sock:ro --name virtual_hosts -e VIRTUAL_HOST=dev.127.0.0.1.xip.io texthtml/docker-vhosts
# set VIRTUAL_HOST env var in others containers to make them discoverable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment