use `hostname` to get ip address

There seems to be an issue when running this container inside a docker container. Calling `hostname`, for some unknown reason, fixes the problem