Skip to content

rootless: enable IPv6 in RootlessKit network namespace#5055

Merged
AkihiroSuda merged 2 commits into
containerd:mainfrom
Akshitguptaa:ipv6-rootless-2608
Jul 12, 2026
Merged

rootless: enable IPv6 in RootlessKit network namespace#5055
AkihiroSuda merged 2 commits into
containerd:mainfrom
Akshitguptaa:ipv6-rootless-2608

Conversation

@Akshitguptaa

Copy link
Copy Markdown
Contributor

Adds CONTAINERD_ROOTLESS_ROOTLESSKIT_IPV6=(true|false) to enable IPv6 inside the
RootlessKit network namespace, wired through to rootlesskit --ipv6.

  • Documented in docs/rootless.md
  • Wired into hack/test-integration-rootless.sh for CI opt-in
  • TestRunContainerWithStaticIP6 now runs under rootless when the flag is set

Scope: covers --port-driver=builtin (the default). --port-driver=slirp4netns
does not yet support IPv6 port forwarding upstream
(rootless-containers/slirp4netns#276 is still open), so that path remains
unsupported here.

Fixes #2608

@AkihiroSuda AkihiroSuda added the area/rootless Rootless mode label Jul 9, 2026
Comment thread docs/rootless.md Outdated
Comment thread extras/rootless/containerd-rootless.sh Outdated
Comment thread hack/test-integration-rootless.sh
Comment thread pkg/rootlessutil/rootlessutil_linux.go Outdated
Comment thread extras/rootless/containerd-rootless.sh Outdated
Comment thread docs/rootless.md Outdated
* `CONTAINERD_ROOTLESS_ROOTLESSKIT_IPV6=(true|false)`: whether to enable IPv6 inside the RootlessKit network namespace.
Defaults to "false". After enabling this, create IPv6-capable CNI networks with
`nerdctl network create --ipv6 --subnet <v6-subnet>` as usual. Published ports over IPv6 are
supported with `--port-driver=builtin` (the default). `--port-driver=slirp4netns` does not yet

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with pasta too? (--net=pasta --port-driver=implicit)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with pasta and --port-driver=implicit, but it currently fails during port exposure with no PortDriver is available. It looks like nerdctl's rootless-port hook expects the PortDriver API to be active when -p is passed, which isn't the case under implicit.

I've updated the docs in 5e18ed0 to explicitly note that pasta isn't supported for IPv6 port forwarding yet.

Comment thread pkg/rootlessutil/rootlessutil_linux.go Outdated
Comment thread extras/rootless/containerd-rootless.sh Outdated
Comment thread pkg/testutil/testutil_linux.go Outdated
Comment thread pkg/testutil/testutil_linux.go Outdated
Comment thread cmd/nerdctl/container/container_run_network_linux_test.go Outdated
@AkihiroSuda AkihiroSuda added this to the v2.4.0 milestone Jul 12, 2026
@Akshitguptaa Akshitguptaa requested a review from AkihiroSuda July 12, 2026 20:41

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 3364639 into containerd:main Jul 12, 2026
51 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support IPv6 in rootless

2 participants