Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter --add-host not working when using also --net=host #2613

Closed
czqrny opened this issue Oct 31, 2023 · 2 comments · Fixed by #3344
Closed

Parameter --add-host not working when using also --net=host #2613

czqrny opened this issue Oct 31, 2023 · 2 comments · Fixed by #3344
Labels
duplicate This issue or pull request already exists

Comments

@czqrny
Copy link

czqrny commented Oct 31, 2023

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

  1. run nerdctl run --rm --add-host=dakfgashfaohsfashfoasfno:2.1.3.7 --net=host ubuntu getent hosts dakfgashfaohsfashfoasfno
  2. run nerdctl run --rm --add-host=dakfgashfaohsfashfoasfno:2.1.3.7 ubuntu getent hosts dakfgashfaohsfashfoasfno
  3. 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.

@czqrny czqrny added the kind/unconfirmed-bug-claim Unconfirmed bug claim label Oct 31, 2023
@AkihiroSuda
Copy link
Member

Is this a duplicate of:

?

@AkihiroSuda AkihiroSuda added duplicate This issue or pull request already exists and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Dec 4, 2023
@yankay
Copy link
Contributor

yankay commented Dec 6, 2023

link to moby/moby#22408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants