I am using docker api to create containers, networks, services etc but my requirement is that I want my public facing container to communicate with another container running on the same network. For that to happen I can use container names as the hostname along with the port through which I am trying to connect my non-public facing container.
I am not able to find the name of the container via any service related api. I can definitely use docker-compose's link feature but I am trying to do that via a API. Can anyone help me with this?