/etc/hosts issue with docker < 1.2

Hi,
I’m trying to use docker for CI. Basically our apache server has a set of vhosts say domain.example.com domain1.example.com etc. So for our internal tests to run tests we need a name server resolution but am not able to edit /etc/hosts in docker prior to 1.2. When i try to run the tests I get “host not found” as there aren’t any resolving mechanisms. Are there any other ways to make this work?

I add a local dnsmasq server to my Docker daemon startup - https://docs.docker.com/reference/commandline/cli/#daemon see --dns. editable /etc/hosts

Mind you, I now use Docker 1.2, as you note, this version allows you to change /etc/hosts, /etc/hostname and /etc/resolv.conf in a running container.