title: Assigning vhosts to Docker ports
body: <p>I have a wildcard DNS set up so that all web requests to a custom domain (*.foo) map to the IP address of the Docker host.  If I have multiple containers running Apache (or Nginx) instances, each container maps the Apache port (80) to some external inbound port.</p>
  
  <p>What I would like to do is make a request to container-1.foo, which is already mapped to the correct IP address (of the Docker host) via my custom DNS server, but proxy the default port 80 request to the correct Docker external port such that the correct Apache instance from the specified container is able to respond based on the custom domain.  Likewise, container-2.foo would proxy to a second container's apache, and so on.</p>
  
  <p>Is there a pre-built solution for this, is my best bet to run an Nginx proxy on the Docker host, or should I write up a node.js proxy with the potential to manage Docker containers (start/stop/reuild via the web), or...?  What options do I have that would make using the Docker containers more like a natural event and not something with extraneous ports and container juggling?</p>