How can I use a docker swarm mode manager behind a

2019-03-31 08:22发布

Some providers, such as ScaleWay will give your server an IP that is not attached to a local interface on the box.

# docker swarm init --advertise-addr <my-external-ip>:2377 --listen-addr 0.0.0.0:2377
Error response from daemon: must specify a listening address
because the address to advertise is not recognized as a system address

While

# docker swarm init --advertise-addr eth0:2377

will advertise a private IP address.

How is docker swarm supposed to be setup in such an environment?

1条回答
可以哭但决不认输i
2楼-- · 2019-03-31 08:54

There is an issue with native swarm mode, when it comes to binding to a non system IP Address as docker 1.12.5. There has been multiple github issues, but the problem still persists.

To define non system IP Address: IP Addresses used with technologies like DNAT. These IP Addresses are not set on local interface and visible to underlying operating system.

sources: link1, link2, link3.

查看更多
登录 后发表回答