you could use --net=host to let the containers use the hostname of the host
--net=host
See: https://docs.docker.com/network/host/