Dockerã§ã®IPv6ãµããŒãã«é¢ããå°ããªããã¹ããšãDockerãããã¯ãŒãã³ã°ã®ãã¥ã¢ã³ã¹ãããã€ããããŸãã
IPv4
ãŠã©ãŒã ã¢ããããã«ã¯ãéåžžã®IPv4å°çšã·ã¹ãã ãæ€èšããŠãã ããã ãã¹ããã·ã³ã«ã¯eth0
ã€ã³ã¿ãŒãã§ã€ã¹ããããŸãã å€éšIPã¢ãã¬ã¹ããã®ã€ã³ã¿ãŒãã§ã€ã¹ã«ãã€ã³ããããŠããŸãã ã«ãŒãããã¯ã€ã³ã¿ãŒãã§ã€ã¹ããããŸãã ãã®ãããªãã·ã³ã«dockerãã€ã³ã¹ããŒã«ãããšã bridge
ãšããããã©ã«ãã®ãããã¯ãŒã¯ãäœæãããŸãã ãã®ãããã¯ãŒã¯ã§ã¯ãå¥ã®docker0
ã€ã³ã¿ãŒãã§ã€ã¹ããã¹ããã·ã³äžã«äœæãããŸãã ãŸãã 172.17.0.1
ãªã©ã®IPã¢ãã¬ã¹ãæã£ãŠããŸãã ã³ã³ãããèµ·åãããšãDockerã¯éžæããããããã¯ãŒã¯ïŒããã©ã«ãã§ã¯bridge
ïŒããã³ã³ããã¢ãã¬ã¹ãå²ãåœãŠãŸãã ããšãã°ã 172.17.0.5
ã ã³ã³ããå
ã«ã eth0
ã€ã³ã¿ãŒãã§ã€ã¹ã衚瀺ãããã¢ãã¬ã¹172.17.0.5
ããã«ãããŸãã ãããã£ãŠãã¢ãã¬ã¹ã¯åºæ¬çã«æŽçãããŸãã ããã§ãã³ã³ããå
ã®ããã»ã¹ãå€éšãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããæ¹æ³ãšãã³ã³ããã®å€ã«åºãããšãå¯èœã«ããæ¹æ³ãç解ããŠã¿ãŸãããã ã³ã³ããå
ã®ããã»ã¹ããããã¯ãŒã¯ãä»ããŠå€éšã€ã³ã¿ãŒãããã«ã¢ã¯ã»ã¹ããå Žåãã¢ãã¬ã¹ãã«ãŒãèšå®ãæ§ææžã¿ã®DNSãªãŸã«ããŒãå¿
èŠã§ãã ãã§ã«ã¢ãã¬ã¹ããããã«ãŒãã¯dockerã«ãã£ãŠèªåçã«ïŒå
éšeth0
çŽæ¥ã次ã«iptablesãä»ããŠïŒã«ãŒãã£ã³ã°ãããDNS dockerã¯/etc/resolv.conf
ãã¡ã€ã«ãããã¹ããã·ã³ãé
眮ããŸãïŒåæã«ãlocalhostã«ã€ãªããè¡ãããããåé€ãããŸãïŒçç±ïŒã DNSã«ã¯æ³šæã1ã€ãããŸããããã©ã«ãã®ãããã¯ãŒã¯ã䜿çšãããdocker network createã³ãã³ãã§ç¬èªã®ãããã¯ãŒã¯ãäœæããå Žåããã®ãããã¯ãŒã¯ã§ã³ã³ãããŒãèµ·åãããšãå¥ã®DNSãµãŒããŒ127.0.0.11
ã/etc/resolv.conf
è¿œå ãããŸãã ãã®ç¹å¥ãªDNSãµãŒããŒã¯çµã¿èŸŒã¿DNSãµãŒããŒãšåŒã°ãããšã³ããªãã€ã³ãã³ã³ããã§æåã§åé€ããå Žåãé€ãããããªãæ¹æ³ã§ãç¡å¹ã«ããããšã¯ã§ããŸããã ãã®æ©èœã¯ãIPv4ã®ã¿ã®ç°å¢ã§ã®äœæ¥ã«ã¯ã»ãšãã©åœ±é¿ããŸããããIPv6ã§ã¯åé¡ã«ãªãå¯èœæ§ããããŸãã IPv6ã«ã€ããŠèª¬æãããšãã«ãããã«æ»ããŸãããã ãã®ããããã©ãã£ãã¯ãå€éšãããã¯ãŒã¯ã«æ£åžžã«å°éããããã®ãã¹ãŠãæã£ãŠããŸãã ã³ã³ããå
ã®ããã»ã¹ãäœããã®ããŒãããªãã¹ã³ããå€éšããã¢ã¯ã»ã¹ã§ããããã«ããå Žåã¯ãæå®ãããã€ã³ã¿ãŒãã§ã€ã¹ããªãã¹ã³ããããã«ããã»ã¹ãæ§æãã-pãã©ã°ã§ã³ã³ãããéå§ããå¿
èŠããããŸãã ãã®å Žåãããã«ãŒã¯ãã¹ããã·ã³äžã§å¥ã®ããã«ãŒãããã·ããã»ã¹ïŒãããããŠãŒã¶ãŒã©ã³ããããã·ïŒãèµ·åãããã¹ããã·ã³ã®ãã¹ãŠã®ã€ã³ã¿ãŒãã§ã€ã¹ã«ãã€ã³ãããæå®ãããã³ã³ãããŒã«ãã©ãã£ãã¯ããããã·ããŸãã
ã¡ãªã¿ã«ãã³ã³ããã«æå®ãããã¢ãã¬ã¹ã¯ãä»ã®ã³ã³ããããçŽæ¥å©çšã§ããŸãïŒãšããŸããã¯ãªããããžãèæ
®ãããªãéãïŒã ããšãã°ã1ã€ã®ã³ã³ããã®ã¢ãã¬ã¹ã172.17.0.5
ã§ãããŒã80ã§ãªãã¹ã³ããŠããå Žåããã¹ããã·ã³ãšä»ã®ã³ã³ããã®äž¡æ¹ãããã®ã¢ãã¬ã¹ã§ã¢ã¯ã»ã¹ã§ããŸãã -p 80:80
ãã©ã°ãæå®ããŠã³ã³ãããå®è¡ããå¿
èŠã¯ãããŸããã ãã®ãã©ã°ã¯ããã¹ããã·ã³ã®å€éšã€ã³ã¿ãŒãã§ã€ã¹ã§ããŒãã«ã¢ã¯ã»ã¹ã§ããããã«ããããšãç®çãšããŠããŸãã
IPv6
ããã§ãã¢ããªã±ãŒã·ã§ã³ã«IPv6ãã¹ããžã®ã¢ã¯ã»ã¹æ¹æ³ãæããå¿ èŠããããšæ³åããŠãã ããã ãã¹ããã·ã³ããeth0ã®IPv4ã¢ãã¬ã¹ã«å ããŠãIPv6ã¢ãã¬ã¹ãåä¿¡ãããšä»®å®ããŸãïŒã°ããŒãã«ã«ã«ãŒãã£ã³ã°å¯èœãªãªã³ã¯ããŒã«ã«ã¢ãã¬ã¹ã¯ã«ãŠã³ããããŸããïŒã ãŸããIPv4-DNSãµãŒããŒã®ä»£ããã«ãIPv6ãµãŒããŒããããŸãïŒAAAAèŠæ±ã«å¿çã§ããIPv4çµç±ã§ã¢ã¯ã»ã¹å¯èœãªDNSãµãŒããŒãããã®ã¯å¥åŠã§ãïŒã ã³ã³ããã«ãIPv6ã䜿çšã§ããããã«ããã«ã¯ã次ã®ãã®ãå¿ èŠã§ãã
- ã³ã³ããã®IPv6ã¢ãã¬ã¹ãé åžããæ¹æ³ãéžæããŸã
- ã«ã¹ã¿ã ãããã¯ãŒã¯ãäœæããããããã©ã«ãã®ããªããžãããã¯ãŒã¯ãæ§æããŸã
-
/etc/resolv.conf
ã³ã³ããã«ç»é²ãããŠããDNSãµãŒããŒãAAAAèŠæ±ã«å¿çã§ããããšã確èªããŸã
DNSã¯æåŸã®æ段ã§ããæåã«IPã¢ãã¬ã¹ã«ã¢ã¯ã»ã¹ããæ¹æ³ãåŠç¿ãã次ã«DNSãµããŒããè¿œå ããå¿ èŠãããããã§ãã
åºæ¬çã«ãIPã¢ãã¬ã¹ãé
åžããããã®æ¬¡ã®ãªãã·ã§ã³ããããŸãïŒ --net=host
ãé€ããããã¯èæ
®ããŸããããã¹ãŠãããã§æ©èœããã¯ãã§ãïŒã
1ïŒãµã€ãº/ 80以äžã®ãããã€ããŒããã®å®éã®ãµãããã
ãããã€ããŒãå®éã®/ 64ãµããããïŒãŸãã¯å°ãªããšã/ 80ïŒãæäŸããå Žåããããæãç°¡åãªãªãã·ã§ã³ã§ãã ã»ãšãã©ã®å Žåã-- --ipv6 --fixed-cidr-v6={{ }}
ãªãã·ã§ã³--ipv6 --fixed-cidr-v6={{ }}
ãæ§æã«è¿œå ããçŽåŸã«ãã¹ãŠãæ©èœããŸãã ããã§ãããã€ãã®sysctlãªãã·ã§ã³ãã€ã³ã¹ããŒã«ããå¿
èŠããããããããŸããïŒ
net.ipv6.conf.all.forwarding=1 net.ipv6.conf.default.forwarding=1 net.ipv6.conf.eth0.accept_ra=2
2ïŒNDPãããã·
ååãªå€§ããã®ãµããããããªããããšãã°16åã®ã¢ãã¬ã¹ïŒ/ 124ïŒã®ã¿ã®å ŽåãNDPãããã·ã䜿çšã§ããŸãã ãã®å Žåãã³ã³ãããŒã¯ç¬èªã«ã¢ãã¬ã¹ãæå®ããå¿ èŠããããŸãïŒã«ã¹ã¿ã ãããã¯ãŒã¯ãæ瀺çã«äœ¿çšããããããã©ã«ãã§æé»çã«ãããã«ãŒãMACã¢ãã¬ã¹ã«åºã¥ããŠäºæ³ã©ããã«ã¢ãã¬ã¹ãæäŸãããšããäºå®ã䜿çšããMACã¢ãã¬ã¹ã¯æåã§æå®ã§ããŸãïŒã ãŸãããã®ãããªåã¢ãã¬ã¹ããã€ããŒãªã¹ãã«è¿œå ããããã€ãã®ã«ãŒãã«ãã©ã°ãæå¹ã«ããå¿ èŠããããŸãã ãã®ãªãã·ã§ã³ã¯ãæäœæ¥ã倧éã«ããããäžäŸ¿ã§ãã ãã®ã¡ãœããã®è©³çŽ°ã«ã€ããŠã¯ã ããã¥ã¡ã³ããåç §ããŠãã ãã ã
3ïŒIPv6 NAT
ãããã€ããŒã1ã€ã®ã¢ãã¬ã¹ã®ã¿ãå²ãåœãŠãå ŽåïŒãŸãã¯NDPãå°ç¡ãã«ããããªãå ŽåïŒãNATã䜿çšããŠæ§æã§ããŸãã ãã®å Žåãä»»æã®ULAãµããããïŒ https://en.wikipedia.org/wiki/Unique_local_addressïŒïŒIPv4ã®10.0.0.0/8
ã¢ããã°ïŒã䜿çšããŠãip6tablesããµãããããšããŠæ§æã§ããŸãã 芪åãªäººãã³ã³ãããŒãäœæããŸããïŒ https://github.com/robbertkl/docker-ipv6nat ïŒãããã¯å®è¡ããã®ãéåžžã«ç°¡åã§ãåäœããŸãïŒæ°ããã³ã³ãããŒãäœæãããšãã«ip6tablesã«ãŒã«ãèªåçã«ç·šéããŸãã ãã®å Žåããããã€ããŒïŒãŸãã¯IaaSïŒã®åäœã«äŸåããªããããå¥ã®ãµãŒãã¹ãããã€ããŒã«åãæ¿ãããªã¹ã¯ã軜æžããããããååãšããŠãã®ãªãã·ã§ã³ãæãŸããããã§ãã ãã®ã¢ãŒãã§IPv6ãæ©èœãããã«ã¯ãæ§æã«ãµãããããç»é²ããïŒãŸãã¯ç¬èªã®æ°ãããããã¯ãŒã¯ãè¿œå ããïŒã ãã§ãå°ããªã³ã³ãããŒãéå§ããã ãã§ãã 圌ã¯æ®ããè¡ããŸãã
次ã«ãéžæããæ¹æ³ã§ãããã¯ãŒã¯ãæ§æããçµã¿ç«ãŠãããåè·¯ã®æäœæ§ã確èªããå¿ èŠããããŸãã
DNS
ãããã£ãŠãDNSãæ€èšããå¿
èŠããããŸãã ããã©ã«ãã®ãããã¯ãŒã¯ã䜿çšããããšã«æ±ºããå ŽåãDNSã«åé¡ã¯ãªãã¯ãã§ãã ããããã«ã¹ã¿ã ãããã¯ãŒã¯ã䜿çšããå Žåã1ã€ã®æ©èœããããŸãã å®éã«ã¯ãDockerãã«ã¹ã¿ã ãããã¯ãŒã¯ã«ã³ã³ãããŒãäœæãããšããDockerã¯åžžã«ç¬èªã®çµã¿èŸŒã¿DNSãµãŒããŒãè¿œå ããŸãã 127.0.0.11
èŠããŠããŸããïŒ ãŸãã圌ã¯ipv6ã®ã¿ã®ãã¡ã€ã³ã解決ã§ããŸããã ããã¯ãããããã°ã§ãã ãããŠåè«ã¯ãããããªãã«ããããšã¯ã§ããªããšããããšã§ãïŒ ãããåãé€ãå¯äžã®æ¹æ³ã¯ãã¢ããªã±ãŒã·ã§ã³ãèµ·åããåã«æã§resolv.confããè¡ãã«ãŒãåããããšã§ãïŒ
RESOLV_CONF=$(sed 's/nameserver 127.0.0.11//g' /etc/resolv.conf) echo "$RESOLV_CONF" > /etc/resolv.conf
ïŒã€ã³ãã¬ãŒã¹ãªãã·ã§ã³ã¯ããã§ã¯æå³çã«äœ¿çšãããŠããŸããsed -i
ã§ãåãããšãè©ŠããŠãã ãããçç±ã¯ç解ã§ããŸãïŒ
ãã®åŸãã³ã³ããã¯ãã¡ã€ã³åãåã³æ£åžžã«è§£æ±ºã§ããŸãã æ§æã¯ãã¹ããã·ã³ããã³ããŒãããŸãã
次ã«ãå€éšããã®æ¥ç¶çšã«ããŒããéãããå Žåãã¢ããªã±ãŒã·ã§ã³ãäžæ£ã«äœæãããipv6ããµããŒãããŠããªãå Žåã®å¯ŸåŠæ¹æ³ã確èªããå¿ èŠããããŸãã
ããŒããéã
ãã¹ãŠïŒãã¹ããã·ã³ãšdockerã®äž¡æ¹ïŒãIPv4ã®ã¿ã§ããå Žåãåé¡ã¯ãããŸããã ã¢ããªã±ãŒã·ã§ã³ã ãã0.0.0.0ã«ãã€ã³ãã§ããã¯ãã§ãã ã¢ããªã±ãŒã·ã§ã³ãããŒã«ã«ãã¹ãã§ã®ã¿ãªãã¹ã³ã§ããå Žåãåãã³ã³ããã§å®è¡ãããŠããã«ã¹ã¿ã tcpãããã·ã®ã¿ãä¿åããŸãã 圌女ã¯ãã¹ãŠã®ã€ã³ã¿ãŒãã§ã€ã¹ã§ãªãã¹ã³ããããŒã¿ãããŒã«ã«ãã¹ãã«ãããŒããã£ã¹ãããŸãã socatã¯ãã®ã¿ã¹ã¯ã«éåžžã«é©ããŠããã¯ãã§ãã
IPv6ãæ±ã£ãŠããå Žåãçæ³çã«ã¯ãããã°ã©ã ããªãã¹ã³ãœã±ãããäœæãã SO_IPV6_ONLY
ãã©ã°ãªãã§::
ã«ãã€ã³ãããå¿
èŠããããŸãã ãã®ãããªãœã±ããã¯::
ãš0.0.0.0
äž¡æ¹ãåæã«ãªãã¹ã³ããŸãã ããã«ãããã¯ãã¹ãŠå€ãã®èŠå ã«äŸåããŸãïŒ
- ãã¹ããã·ã³ã«ãã¥ã¢ã«ã¹ã¿ãã¯ããããŸããããããšãIPv6ã®ã¿ã§ãã
- ãŠãŒã¶ãŒã©ã³ããããã·ãèµ·åãããããã©ã°
--userland-proxy=false
ããŒã¢ã³ãå®è¡ããã - éžæãããŠããIPv6ãµããŒãã¡ã«ããºã ïŒå®/ 64ãµãããããNDPãããã·ãIPv6 NATããŸãã¯ãã®ä»ã®ã«ã¹ã¿ã ããããž
ååãšããŠããã¥ã¢ã«ã¹ã¿ãã¯ãšIPv6å°çšã¹ã¿ãã¯ã®éã«å€§ããªéãã¯ãããŸããã å éšã§ã¯ãããã«ãŒã¯IPv4ãåºç€ãšããŠäœ¿çšããIPv6ãè¿œå ãšããŠã®ã¿èæ ®ããããããã¥ã¢ã«ã¹ã¿ãã¯ãåŒãç¶ãååšããŸãã ããã«è¡ãå¿ èŠãããã®ã¯ãäž¡æ¹ã®ãããã³ã«ã§ããŒãã«å€éšããã¢ã¯ã»ã¹ã§ããããšã確èªããããšã ãã§ãã
ãŠãŒã¶ãŒã©ã³ããããã·ã¯ããå°ãè€éã§ãã æåã«ãããã©ã«ãèšå®ã䜿çšããïŒãŠãŒã¶ãŒã©ã³ããããã·ãæå¹ã«ãªã£ãŠããïŒããå®å
šã«ç¡å¹ã«ãããã決å®ããå¿
èŠããããŸãã å®éãããŒãã®å
¬éããã³è»¢éãã©ãã£ãã¯ãå®å
šã«iptablesã§æ§æã§ããå Žåããªãå¿
èŠãªã®ã§ããïŒ ãããŠç¢ºãã«ããã®ãããªæ©äŒããããŸãã --userland-proxy=false
ãªãã·ã§ã³ã--userland-proxy=false
engineæ§æã«è¿œå ã§ããŸãã ããããããã€ãã®ãã¥ã¢ã³ã¹ããããŸãã ãŸããiptablesã䜿çšããŠãçŸåšéããŠããããŒããäžæžãã§ããŸãã ããšãã°ãäžéšã®ã¢ããªã±ãŒã·ã§ã³ãããŒã80ã§ãªãã¹ã³ããŠããå ŽåãDockerãæ¥ãŠããã®ããŒãã®ãã±ãããã³ã³ããã«è»¢éããã«ãŒã«ãè¿œå ããããã«èŠæ±ããŸããã ãã¡ã€ã¢ãŠã©ãŒã«ã¯ãOKããšå¿çãããã®åŸããã©ãã£ãã¯ã¯æåã®ã¢ããªã±ãŒã·ã§ã³ãžã®çä¿¡ãåæ¢ããŸããã ãã®ç¶æ³ã§docker-proxyã¯èµ·åããªãã ãã§ãããŒããããžãŒã§ããããšãéç¥ããŸãã ãŸããiptablesã¯ãã«ãŒãããã¯ã€ã³ã¿ãŒãã§ã€ã¹ããã®ãã©ãã£ãã¯ã®è»¢éãèš±å¯ããŸãããã€ãŸãããã¹ããã·ã³ã®ã¢ãã¬ã¹127.0.0.1ããã³:: 1ã§ãã³ã³ããã¯äœ¿çšã§ããŸããã æåã®ã±ãŒã¹ã§ã¯ããããããã§ãã¯ãå®è¡ã§ããŸãããååãšããŠããŒã«ã«ãã¹ãã¯ããŸãå¿
èŠãããŸããã ããããæ倧ã®åé¡ã¯ã-- --userland-proxy=false
ããŸã æ¬çªã«å¯Ÿå¿ããŠããªãããšã§ãã ããã§ã¯ããã®ãªãã·ã§ã³ãæå¹ã«ãããšæ·±å»ãªåé¡ãçºçããæ¹æ³ã«ã€ããŠèª¬æããŸãã ãããŠãã©ããããè¿ãå°æ¥ãããã¯ä¿®æ£ããããã«ãªãã ãã®ããããŠãŒã¶ãŒã©ã³ããããã·ã䜿çšãããšè¿œå ã®ã¡ã¢ãªæ¶è²»ãçºçããå Žåã§ããçŸæç¹ã§ã¯ãŠãŒã¶ãŒã©ã³ããããã·ããªãã«ããªãããšããå§ãããŸãã
ãã¥ã¢ã«ã¹ã¿ãã¯ã§ãŠãŒã¶ãŒã©ã³ããããã·ã䜿çšãããšããã¹ãŠã®ã€ã³ã¿ãŒãã§ã€ã¹ã®ããŒãã§ãªãã¹ã³ããŸããããã©ãã£ãã¯ã1ã€ã®IPã¢ãã¬ã¹ã®ã¿ã«è»¢éã§ããããšãèŠããŠããå¿
èŠããããŸãïŒãã©ã³ãµãŒã§ã¯ãããŸããïŒã ã³ã³ããã«IPv4ãšIPv6ã®2ã€ãããå Žåãã©ã¡ããéžæãããŸããïŒ ãœãŒã¹ã§ã¯ãIPã¢ãã¬ã¹ãéžæãããŠããããšãããããŸãã
https://github.com/docker/libnetwork/blob/master/portmapper/mapper.go#L96
ããããå®éã«éžæãããã®ã¯ã©ãã§ããïŒ å®éšã«ãããIPv4ã¢ãã¬ã¹ãåžžã«éžæãããããšãå€æããŸããã æ£ç¢ºãªçããåŸãã«ã¯ãã³ãŒãã調ã¹ãå¿
èŠããããŸã
https://github.com/docker/libnetwork/blob/master/drivers/bridge/bridge.go
ãããã«ããïŒåºæ¬çãªæšå¥šäºé
ã«æ»ãïŒãçæ³çã«ã¯ããã¹ãŠã®ã€ã³ã¿ãŒãã§ã€ã¹ããªãã¹ã³ããããã«ã¢ããªã±ãŒã·ã§ã³ã«æããå¿
èŠããããŸãã ãã以å€ã®å Žåããªã¹ã¯ããããŸãã ããšãã°ãIPv6 NAT +ãŠãŒã¶ãŒã©ã³ããããã·ã䜿çšãããŠããå Žåãã¢ããªã±ãŒã·ã§ã³ã¯IPv4ã®ã¿ããªãã¹ã³ãããã¹ããã·ã³ã«ã¯ãã¥ã¢ã«ã¹ã¿ãã¯ããããIPv4ãä»ããŠå€éšããæ¥ç¶ããããšãããšãã¹ãŠãæ£åžžã«ãªããŸãããIPv6ã§ã¯æ©èœããŸããã ãªãã§ïŒ çä¿¡IPv4ãã±ããã¯docker-proxyãä»ããŠã³ã³ããã®IPv4ã¢ãã¬ã¹ã«ãããã·ãããIPv6ãã±ããã¯IPv6 NATã«ãã£ãŠäœæãããip6tablesã«ãŒã«ã䜿çšããŠã³ã³ããã®IPv6ã¢ãã¬ã¹ã«å€æãããããã§ãã ã€ãŸããIPv4æ¥ç¶ã¯åæ³çã«ãŠãŒã¶ãŒã©ã³ããããã·ãééããIPv6ãã©ãã£ãã¯ã¯çŽæ¥ã³ã³ãããŒã«å°éããŸãïŒ ããã¯ã python -m SimpleHTTPServer 8000
ãšããã€ãã®nc6 -6 -l -p 8000 --continuous --exec cat
ãåæã«ã³ã³ãããŒã§å®è¡ããããšã§ç°¡åã«ç¢ºèªã§ããŸãã 2ã€ã®ããã»ã¹ã¯åãããŒãã§ãªãã¹ã³ããŸãããç°ãªãIPã«ãã€ã³ããããŸãïŒã0.0.0.0ããšã::ãã telnetã¯ããããšã¯ç¬ç«ããŠåäœããŸããIPv6ã¯IPv6ãIPv4ã¯IPv4ã«ã€ãªãããŸãã ãã®åŸããã®ã³ã³ãããæäŸããããã«ãŒãããã·ããã»ã¹ãèŠã€ããŠåŒ·å¶çµäºãããšãIPv4æ¥ç¶ã¯åãå
¥ããããªããªããIPv6ã¯äœãèµ·ãããªãã£ãããã«åäœãç¶ããŸãã
ãããã«
- IPv6 NATã䜿çšããŸãã éããŠäŸ¿å©ã§ããªã¹ã¯ãæãå°ãªãã§ãã
- ã¢ããªããã¹ãŠã®ã€ã³ã¿ãŒãã§ã€ã¹ã§ãªãã¹ã³ããããã«ããŸãã ããã«ãããæå°éã®ãªã¹ã¯ã§ããŒããéãããäœããæ©èœããŠããªãããšãããããŸãã
- ã«ã¹ã¿ã ãããã¯ãŒã¯ïŒdocker network createïŒã䜿çšããŠããå Žåã¯ãã¹ã¿ãŒãã¢ããã¹ã¯ãªããã«ã³ãŒããè¿œå ããŠãçµã¿èŸŒã¿DNSãµãŒããŒã/etc/resolv.confããåé€ããŸãã ããã«ãããAAAAå°çšãã¡ã€ã³ãšé£çµ¡ãåãåãããšãã§ããŸãã
- ãŠãŒã¶ãŒã©ã³ããããã·ãæåŠããªãã§ãã ããã åºç¯å²ã®ããŒããå¿
èŠãªå Žåã¯ã
--net=host
ã䜿çšããããšãã--net=host
äžè¬ã«ãDockerã§ã®IPv6ãµããŒãã¯å®å šã«æºåãæŽã£ãŠããããã«ã¯èŠããŸããã ãã ããããªã蚱容ã§ããçšåºŠã®çåãå¯èœã«ããéçºããã§ã«ãããŸãã ãããã£ãŠãæ°ããæ代ãéè¿ã«è¿«ã£ãŠããŸãã