问题
I ran docker swarm init
on master node
Then ran docker swarm join --token SWMTKN-1-xxxx 192.168.1.105:2377
from worker nodes.
I have total 5 nodes (3 ubuntu, 2 mac)
I deploy by docker stack deploy -c docker-compose-worker.yml --with-registry-auth PL
The command above starts up a container in each node.
However docker network inspect PL_default
shows only 3 peers(all ubuntu).
The 2 nodes can't ping the master or any other node using the ip listed under Containers
"Containers": {
"ba41b64a7023beda84083b728194abb882d04eaf23057e7ee8ace698d1e4f7cf": {
"Name": "PL_spark-worker.1.ntq6o5ynuq1qjzpu16dkd81i1",
"EndpointID": "c6c76b074afb13a72dbbff23c504bb4e7013c70dfbdad6958ff0caebc00da109",
"MacAddress": "02:42:0a:00:02:26",
"IPv4Address": "10.0.2.38/24",
"IPv6Address": ""
},
"cf35c1ac8e3e81e5d78219ae5d1903bc21728e1e55c6fdea6da56777a2c6c963": {
"Name": "PL_spark-master.1.cx9nlup5jmr8u9eqal99g67p4",
"EndpointID": "e847acc5c89a058157a513972b3fcf3e2558a25a7dcabcfc70fb5a1c8d08b914",
"MacAddress": "02:42:0a:00:02:25",
"IPv4Address": "10.0.2.37/24",
"IPv6Address": ""
},
"lb-PL_default": {
"Name": "PL_default-endpoint",
"EndpointID": "b1269a5f1aad5228254e5de69fe96a5b96e52313c6f18c174ce12357264001b7",
"MacAddress": "02:42:0a:00:02:04",
"IPv4Address": "10.0.2.4/24",
"IPv6Address": ""
}
},
"Peers": [
{
"Name": "8a91513fec15",
"IP": "192.168.1.105"
},
{
"Name": "fb24a4880049",
"IP": "192.168.1.104"
},
{
"Name": "f9775403a53f",
"IP": "192.168.1.100"
}
]
Where should I look?
- edit
Per-container IP addressing is not possible The docker (Linux) bridge network is not reachable from the macOS host
https://docs.docker.com/docker-for-mac/networking/
What does the above line mean? Does it mean you can't connect to docker on linux from docker on macOS ?
来源:https://stackoverflow.com/questions/59685602/docer-swarm-mode-with-ubuntu-and-mac