containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
8.11k stars 601 forks source link

support default Dynamic IPv6 subnet allocation and ip6tables #3637

Open finch71 opened 2 hours ago

finch71 commented 2 hours ago

What is the problem you're trying to solve

nerdctl doesn't listen on ipv6 by default

Describe the solution you'd like

https://docs.docker.com/engine/daemon/ipv6/

Additional context

https://github.com/containerd/nerdctl/pull/127

finch71 commented 1 hour ago

At the moment it requires user to configure every network one by one. and it doesn't support configuring ip6tables

cat >/etc/cni/net.d/10-mynet.conf
{
        "cniVersion": "0.2.0",
        "name": "mynet",
        "type": "bridge",
        "bridge": "cni0", 
        "ipam": {
                "type": "host-local",
                "subnet": "2001:db8::/96",
                "routes": [
                        { "dst": "::/0" },
                        { "dst": "2001:db8::/96" }
                ]
        }
}

./nerdctl --snapshotter native run --network mynet  -d -p 80:80  alpine  sleep 300

./nerdctl ps
CONTAINER ID    IMAGE                              COMMAND        CREATED               STATUS    PORTS                                NAMES
7e31884d8ba0    docker.io/library/alpine:latest    "sleep 300"    About a minute ago    Up        0.0.0.0:80->80/tcp, :::80->80/tcp