简体   繁体   中英

How can I make a service accessible to itself using host IP address inside a Docker container?

I have a software (which I can not change) running inside a Docker container (let's say it's service is available in http://192.168.0.5:8080/x ) on Ubuntu. The software tries to make a connection to itself via host's external IP (let's say through http://200.200.200.200:8080/x ), without success (connection timeout/no route to host).

Externally I can access the service because the port 8080 is being mapped and exposed to the host.

How can I make the service accessible to itself through host's external IP?

It was a Firewall issue on the host. After adding all the used ports to the FirewallD the service is accessible though external IP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM