I deploy 2 container of Elasticsearch by the next commands:
docker run --network host -p 9201:9200 -p 9301:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.8.1
docker run --network host -p 9202:9200 -p 9302:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.8.1
when I try to run the next command from one of the containers
curl localhost:${PORT_OF_THER_OTHER_CONTAINER}
I get the next error
curl: (7) Failed connect to localhost:PORT_OF_THER_OTHER_CONTAINER; Connection refused