ES 5.6.16 Docker cluster on multiple physical machines via Docker on custom ports

Hi,

I'm trying to set up a ES cluster via docker-compose on multiple machines, 4 in total. They are part of the same internal network and I think I'm fairly close, but the nodes still don't seem to see each other.

The main problem is that all the physical machines have ES 2.4 running directly on the host, so I figured I'll try to set up ES 5 (as the overlying software dropped support for ES 2.x) on the same machines, see if it all works. That's why I have to use different ports than 9200 and 9300.

docker-compose.yml (only node.name and network.publish_host change among the cluster):

version: '2'
services:
  elasticsearch1:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16
    container_name: ors-es4
    environment:
      - cluster.name=ors-pelias-es5
      - network.bind_host=0.0.0.0
      - network.publish_host=192.168.2.74
      - transport.tcp.port=9310
      - http.port=9210
      - discovery.zen.ping.unicast.hosts=192.168.2.71,192.168.2.72,192.168.2.73,192.168.2.74
      - discovery.zen.minimum_master_nodes=3
      - gateway.recover_after_nodes=3
      - gateway.expected_nodes=4
      - gateway.recover_after_time=5m
      - node.name=ors-pelias-n4
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - /srv/elasticsearch/es5:/usr/share/elasticsearch/data
    ports:
      - 9210:9200
      - 9310:9300

This still results in

[2019-07-23T13:25:19,347][WARN ][o.e.d.z.ZenDiscovery     ] [ors-pelias-n4] not enough master nodes discovered during pinging (found [[Candidate{node={ors-pelias-n4}{aIUg_aiATPalwga82pzcMg}{vU0cNqgMTxCy0WlGPPx3jA}{192.168.2.74}{192.168.2.74:9310}{ml.max_open_jobs=10, ml.enabled=true}, clusterStateVersion=-1}]], but needed [3]), pinging again

I tried to add :9310 to all unicast.hosts and a few other things related to host names and ports, no luck (sorry, can't remember it all, been playing around since 5 hours basically).