Find IP address of container

docker inspect -f '{{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' CONTAINER_ID

Run on the host’s network

Add –net=”host” to the docker run command to run on the host’s 127.0.0.1 network. Port forwarding won’t be necessary to reach these services (from the localhost anyway), so use -p PORT instead of -p PORT:PORT.

docker run --net="host" COMMAND