dunhanson
V2EX  ›  问与答

docker stack 容器互 ping 不通

  •  
  •   dunhanson · Feb 16, 2019 · 2120 views
    This topic created in 2643 days ago, the information mentioned may be changed or developed.

    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 replies    2019-02-16 16:15:54 +08:00
    dunhanson
        1
    dunhanson  
    OP
       Feb 16, 2019
    网络 multi 是 overlay
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1185 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:46 · PVG 01:46 · LAX 10:46 · JFK 13:46
    ♥ Do have faith in what you're doing.