Setting up ES multi-node on multiple hosts

Check this answer on a similar question.

Basically you need to have the network.publish_host with the IP address of your docker host, and also use network.bind_host as 0.0.0.0.

Something like this in each compose:

- network.bind_host=0.0.0.0
- network.publish_host=DOCKER-HOST-IP

The documentation for these settings are here.