containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nerdctl / docker behavior divergence on `--net bridge --ip-address`

apostasie opened this issue · comments

Description

This is the aftermath of #3097 and #3088.

Docker does not allow specifying an ip-address on non-user defined networks.
However, nerdctl does allow it for bridge.

Previously this was tolerated by docker (although it was a no-op as the ip was simply ignored), but now, it is a hard error.

We need to decide what to do here:

  • option A: do nothing - this is a difference between nerdctl and docker - this is my preference
  • option B: align behavior with Docker and bail out if an ip address is specified on a non-user defined network (which makes sense for none and host, but then, our concept of bridge is different from Docker)

Thoughts?

Steps to reproduce the issue

docker-24 run  -d --name foobar --ip 172.17.0.42 alpine sleep 1000
docker-26 run  -d --name foobar --ip 172.17.0.42 alpine sleep 1000
nerdctl run  -d --name foobar --ip 10.4.0.42 alpine sleep 1000

Describe the results you received and expected

na

What version of nerdctl are you using?

1.7.6

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Option A sounds good

I perfer option A.