nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

feat(network): add support for static IPv6 assignment

Open frits-v opened this issue 2 months ago • 0 comments

This PR introduces end-to-end support for assigning static IPv6 addresses to containers, both via the command line and through nerdctl compose.

Key changes:

  • A new --ip6 flag is added to nerdctl run to allow direct assignment of a static IPv6 address.

  • The CNI bridge configuration for IPv6 networks is now updated to declare the "ips" capability. This is required by libcni to process static IP capability arguments.

  • To prevent regressions in downstream CNI plugins (like dnsname and firewall), the "dns" and "portMappings" capabilities are also explicitly declared for IPv6 networks. This avoids issues where implicit capabilities were being dropped.

  • The compose parser now recognizes the ipv6_address field within a service's network configuration and translates it to the --ip6 flag during container creation.

  • Adds comprehensive integration tests for static IPv4, IPv6, and dual-stack IP assignment, as well as unit tests for compose file parsing, to validate the new functionality and prevent regressions.

fixes #4597

frits-v avatar Nov 10 '25 22:11 frits-v