ゆずまの○○日記がシンプルでいいと思います!

プログラミングを中心に書いていこうと思ってます。

Docker Swarm Init でエラーメッセージが出る

$ docker swarm init

Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces (10.0.2.15 on eth0 and 192.168.99.100 on eth1) - specify one with --advertise-addr

複数IPアドレスを持っているのが問題っぽいので、 たぶん、IPを指定する必要がある? (Oracle VirtualBoxをインストールしてるので、複数のIPアドレスを持っている)

$ docker swarm init --advertise-addr="192.168.99.100"

Swarm initialized: current node (fx2yzfa89dla8q0259rbgvfgp) is now a manager.

To add a worker to this swarm, run the following command:

docker swarm join --token SWMTKN-1-11090xbudo7evltxkm1ogtxcr9ajyb1a43oh5jbwpcac66m20w-abqlapc6eij6ofbu7v76otubv 192.168.99.100:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.