Author's post about the ngproxy, GitHub page with manual
Let's run!
- Run the nginx-proxy container.
Bind it to the port 80 on localhost and it will monitor all other containers (using /var/run/docker.sock file)
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy - Run your custom container with VIRTUAL_HOST parameter:
nginx-proxy container will notice it and will actualize its settings to point your alias to this container.
$ docker run -e VIRTUAL_HOST=my-container.local my-image - Point the alias to the localhost in /etc/hosts
127.0.0.1 my-container.local