containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
7.98k stars 594 forks source link

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

Closed apostasie closed 3 months ago

apostasie commented 3 months ago

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:

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

AkihiroSuda commented 3 months ago

Option A sounds good

Zheaoli commented 3 months ago

I perfer option A.