DEV Community

Discussion on: Build a Docker IPv6 Network

Collapse
 
gengjiawen profile image
gengjiawen

Is there docker-compose example you can show ? Last time I tried by official docs, still failed :(

Collapse
 
joeneville_ profile image
Joe Neville

This worked for me. See notes inline

# Note the version number, ipv6 not support on v3
version: "2.4"
# Create a service to ping the gateway, network1 is assigned
services:
  deb6:
    image: debian:10.10
    command: ping6 -c 4 2001:db8:99::1
    networks:
      - network1
# Create and address IPv6 network1
networks:
  network1:
    enable_ipv6: true
    ipam:
      config:
        - subnet: 2001:db8:99::/64
          gateway: 2001:db8:99::1
Enter fullscreen mode Exit fullscreen mode

I'll write a new post to cover compose because there are a few more notes, but that file works for me.

Collapse
 
gengjiawen profile image
gengjiawen

thx. I will give it a try.

Collapse
 
joeneville_ profile image
Joe Neville

Thanks for the comment, I haven't tried that yet. I'll give it a go ๐Ÿ‘