Skip to content

Conversation

@frits-v
Copy link
Contributor

@frits-v frits-v commented Nov 10, 2025

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 frits-v marked this pull request as draft November 11, 2025 04:11
@frits-v frits-v force-pushed the feat/compose-ipv6_address branch 4 times, most recently from 7c24e65 to b3cb854 Compare November 13, 2025 18:49
@frits-v frits-v marked this pull request as ready for review November 13, 2025 18:49
@frits-v frits-v changed the title feat(compose): add ipv6-address parsing feat(network): add support for static IPv6 assignment Nov 13, 2025
@frits-v frits-v force-pushed the feat/compose-ipv6_address branch 2 times, most recently from 38ed40e to e3babdc Compare November 14, 2025 05:51
@frits-v frits-v marked this pull request as draft November 14, 2025 05:57
This commit 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 containerd#4597

Signed-off-by: Frits <[email protected]>
@frits-v frits-v force-pushed the feat/compose-ipv6_address branch from e3babdc to e790552 Compare November 14, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for configuring static ipv6_address (compose and nerdctl run)

1 participant