V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
dunhanson
V2EX  ›  问与答

docker stack 容器互 ping 不通

  •  
  •   dunhanson · Feb 16, 2019 · 2099 views
    This topic created in 2635 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   ·   916 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:00 · PVG 07:00 · LAX 16:00 · JFK 19:00
    ♥ Do have faith in what you're doing.