See my real ip (or an X-FORWARDED-FOR header): ex: 10.100.2.14
Instead I see 172.19.0.1, which is not my host’s ip.
Steps to reproduce the behavior
HOST: docker run --rm --name nginx-test -p 8080:80 nginx
HOST: curl localhost:8080
- You’ll see an ip in the logs with something like
172.17.0.1, take note of that.
This is not the ip address of the actual machine that made the call. For debuggers that call back to the originating ip (such as php xdebug) this means docker cannot be used to debug anything. I would expect to see an IP of the original machine (such as a truly remote host).