nerdctl
nerdctl copied to clipboard
Parameter --add-host not working when using also --net=host
Description
When I run container using nerdctl run ...
the parameter --add-host
is not working when I also use --net host
parametr. This seems to be strange because the same is working well on docker.
Steps to reproduce the issue
- run
nerdctl run --rm --add-host=dakfgashfaohsfashfoasfno:2.1.3.7 --net=host ubuntu getent hosts dakfgashfaohsfashfoasfno
- run
nerdctl run --rm --add-host=dakfgashfaohsfashfoasfno:2.1.3.7 ubuntu getent hosts dakfgashfaohsfashfoasfno
- compare results
Describe the results you received and expected
First command is giving no output, second one gives an entry defined by --add-host
parameter. I expect that both commands gives the same results.
What version of nerdctl are you using?
1.6.2 installed in rootles mode, but I discoverd it on one of my hosts with version 1.4.0.
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
Virtual machine on OpenStack cloud, running on Ubuntu-focal.
Is this a duplicate of:
- https://github.com/containerd/nerdctl/issues/2591
?
link to https://github.com/moby/moby/pull/22408