title: How to connect to a docker container using a domain name
body: <p>So I have some docker web application, when it loads using <code>docker-compose</code> the dhcp service chooses some ip address lets say <code>192.168.96.3</code>, the webapp is located at port <code>6000</code>, so connecting to the webapp I use <code>http://192.168.96.3:6000</code>. Is there any way, in the <code>docker-compose.yml</code> to assign the domain name <code>foo.local</code> so that when I connect to the webapp I type in <code>foo.local:6000</code>?</p>
  <p>In my <code>docker-compose.yml</code>, can I add a domain name that my host machine can map to the dynamic ip of the container?</p>
  <p><strong>Note:</strong>
  The container uses its own network, so attaching it to the host network will conflict with its purpose.</p>