docker stack 容器互 ping 不通,会有什么原因导致的?
端口开通了
firewall-cmd --zone=public --add-port=2377/tcp --permanent
firewall-cmd --zone=public --add-port=7946/tcp --permanent
firewall-cmd --zone=public --add-port=7946/udp --permanent
firewall-cmd --zone=public --add-port=4789/tcp --permanent
firewall-cmd --zone=public --add-port=4789/udp --permanent
firewall-cmd --reload
docker-compose.yml 配置
version: '3.7'
services:
busybox:
image: busybox
command: ping www.baidu.com
networks:
- multi
deploy:
replicas: 2
networks:
multi:
external: true
name: multi
1
dunhanson OP 网络 multi 是 overlay
|