Both containers are accessible from the outside world and even I can access third-party APIs in the container. However, when I am trying to access container 1 from container 2 using its fully qualified domain, it times out.
I installed curl inside the container it seems that it cannot reach out to the host’s public IP address. What would be an appropriate solution? You may wonder why I am doing this because eventually these 2 services will be hosted on completely independent servers.
* `$ docker run -it --net container:<container_name> nicolaka/netshoot`
If you replace <container_name> with the id or container name of container 2 in above example, you should get an interactive terminal in the netshoot container, that hooks into the network namespace of container 2 (=uses network interface of container 2). You can use it for further diagnostics.