Docker for mac does not add docker hostname to /etc/hosts

No; beta 9 made the port publishing mechanism much closer to what’s on Linux, and the artificial docker.local hostname (which was never published to containers) is gone. You need to use normal container linking, or use the DNS-based container lookup on a private Docker network, or whatever other service discovery system you use.