Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a docker container running on a Windows Server host, it has a Java app running which communicates with remote client bidirectionally, when the remote client communicates with my server it gets the Docker gateway ip, 10.1.0.1 instead of the remote ip;

Problem with local ip

It only happens on Windows host, with an Ubuntu Server host it works without any trouble, I get the remote client ip, which I need to answer the petition.

Things I tried:

  • Disable ip masquerading from docker-compose.yaml file with;

    com.docker.network.bridge.enable_ip_masquerade: 'false'
    
  • Disable ip masquerading from daemon.json with;

    "ip-mask": false
    

This is how I create the network on docker-compose.yaml;

docker-compose.yaml

Nothing of these two solutions worked, thanks in advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
179 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...