How to link Docker services across hosts?

前端 未结 8 1500
南笙
南笙 2021-01-29 17:51

Docker allows servers from multiple containers to connect to each other via links and service discovery. However, from what I can see this service discovery is host-local. I wou

8条回答
  •  無奈伤痛
    2021-01-29 18:44

    Seems like docker swarm 1.14 allows you to:

    • assing hostname to container, using --hostname tag, but i haven't been able to make it work, containers are not able to ping each other by assigned hostnames.

    • assigning services to machine using --constraint 'node.hostname == '

提交回复
热议问题