Use the extra_hosts option in docker-compose:
Read more ...
Use host network bridge.
A volume is automatically created if a path is not given e.g: