Skip to content

network create: option parity with docker network create #5012

Description

@mayur-tolexo

I was comparing nerdctl network create with docker network create (Docker 29.4.0) and figured it is worth tracking the gaps in one place. Docker reference for these flags: https://docs.docker.com/reference/cli/docker/network/create/

Most of it already lines up — --driver, --opt, --ipam-driver, --ipam-opt, --subnet, --gateway, --label, --internal and --ipv6 all behave like Docker.

A few things differ or are missing:

  • --ip-range only takes a single value and applies it to every subnet, whereas Docker takes it per subnet (it is repeatable). So on a dual-stack network the IPv4 range ends up being checked against the IPv6 subnet and creation fails. Same shape as the --gateway problem fixed in fix(network): match each gateway to its subnet for dual-stack #5010, and the fix would be the same: make it repeatable and match each range to the subnet that contains it.
  • There is no --ipv4. Docker uses it to disable IPv4 so you can create an IPv6-only network; nerdctl has no equivalent.
  • --aux-address (per-subnet auxiliary addresses) is not implemented.

Happy to work on these - --ip-range, --ipv4 and --aux-address - if they sound reasonable.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions