Using the above output as an example, you could connect to your Docker host from inside of a container by using this IP address: 172.17.0.1. The --ip parameter has been added to specify the IP address of the container. Now, perform steps 2 to 4 from the previous method and validate docker command-line instructions and image build. You can use the following command to create a bash session of a stopped container - $ docker start -ai myubuntu. While in /var/log/haproxy.log, I see my client ip just fine. Examine the Alternative. sudo docker run it
docker get container ip inside container