title: add entry to host /etc/hosts file when a docker container is started
body: <p>I want to be able to add hostnames to my laptop /etc/hosts that maps to a docker container. Since container ips are not static, each site I start/restart a container I would need to update the /etc/hosts file manually which is not very practical.</p>
  
  <p>I am looking for a simple way to solve this.
  I could do some sort of script, which listens to docker events, checks for container ip and updates /etc/hosts but I dont want to reinvent the wheel. (something like this: <a href="https://github.com/discordianfish/docker-spotter" rel="noreferrer">https://github.com/discordianfish/docker-spotter</a>) but I couldnt really understand how it works.</p>
  
  <p>Anybody has a suggestion?.
  Thank you.</p>