Docker swarm和节点上的ipv6

时间:2018-03-20 13:02:53

标签: docker ipv6 docker-swarm

我有泊坞群。

version: "3.2"

services:
  manager:
    image: busybox
    networks:
      - frontend
    deploy:
      placement:
        constraints: [node.role == manager]

  worker:
    image: busybox
    depends_on:
      - manager
    networks:
      - frontend
    deploy:
      placement:
        constraints: [node.label.name == hp-laptop]

networks:
  frontend:

在标签为 hp-laptop 的主机上,我有ipv​​6地址。

ping6
PING google.com(lhr.net) 56 data bytes
64 bytes from lhr.net: icmp_seq=1 ttl=57 time=36.6 ms
64 bytes from lhr.net: icmp_seq=2 ttl=57 time=30.0 ms
64 bytes from lhr.net: icmp_seq=3 ttl=57 time=30.6 ms

如何使用docker stack配置从主机(hp-laptop) docker swarm node 提供ipv6支持?

1 个答案:

答案 0 :(得分:1)

IPv6 doesn't work in Overlay networks。您必须使用桥接网络。