Open Eh1Ka6 opened 3 years ago
For Docker Desktop for Mac I think that's still expected, due to how networking is set up (it's a known issue, but there's quite some complexity involved in docker desktop to make networking "work").
Assuming for the other situation you're running on a Linux machine; does it work if you configure the daemon to not use the userland-proxy? By default, docker uses a proxy to provide hairpin connections; we're planning to change that default (https://github.com/moby/moby/issues/14856), but ran into issues with some "older" distros did not work well without.
You can disable the userland proxy in the daemon configuration (https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file), e.g.
in /etc/docker/daemon.json
(assuming you don't have other options set in that file);
{"userland-proxy": false}
After creating, or modifying the /etc/docker/daemon.json
, the docker service must be restarted for the change to take effect.
Of course, be sure to try this in a test-environment to verify, before changing your production environment.
-->
Refering to a similar problem seen in docker for-mac I'm using Apache inside an alpine docker-container within kubernetes node replication environnement This container use ProxyPassMatch to serve the php container
Within the php container i try to gather the user's IP with echo $_SERVER["REMOTE_ADDR"]. The ouput shows the IP of the node hosting the container instead of the ip of the end user
Steps to reproduce the issue:
Result will be the adress of the node instead of the client
Additional information you deem important
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):