OK, I misread your 1st post, I thought the two containers were running on the same host.
Anyway, as mentioned on the Docker documentation, host networking consists in running the container in the same network configuration as the host. ES nodes can recognize each other because they have the same IP as your host and as your ES configuration files.
However, with a bridge network, it is kind of NATted. So when you specify for each ES node (in elasticsearch.yml) its IP as 10.123.4.xxx, it won't recognize itself, because its real IP address is 172.21.0.xxx
Did you also try with the default bridge network provided by Docker ?
Because maybe this option would help NATting communications between the two containers :
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.