get started with docker

zhong@slave2:~/pycharmProj/testdoc$ sudo docker swarm init
Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces (172.28.171.16 on eno1 and 172.17.0.154 on rename3) - specify one with --advertise-addr

zhong@slave2:~/pycharmProj/testdoc$ sudo docker swarm init --advertise-addr 172.28.171.16
Swarm initialized: current node (xwt00fajygdg0c19yx54i0a9u) is now a manager.

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

    docker swarm join --token SWMTKN-1-2wm0yt9lao3ihynmpn2vjmp3938dbokr8vx8iapkri8ivmanin-6nysq6e510b09myqiai6j3rhe 172.28.171.16:2377

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

zhong@slave2:~/pycharmProj/testdoc$ sudo docker stack deploy -c docker-compose.yml getstartedlab
Creating network getstartedlab_webnet
Creating service getstartedlab_web
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章