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

arguments needed for --net /run/netns/{ns} #315

Open
chnrxn opened this issue Aug 16, 2023 · 1 comment
Open

arguments needed for --net /run/netns/{ns} #315

chnrxn opened this issue Aug 16, 2023 · 1 comment
Assignees

Comments

@chnrxn
Copy link
Contributor

chnrxn commented Aug 16, 2023

I’d like to check what’s the correct arguments to supply to containers.run() to get the same effect as

podman run --net ns:/run/netns/ns1 ...

I have created a new network namespace with ip netns add ns1 and I'd like to create a new container using the Podman API to join this namespace. I successfully joined the name space on the command line with podman run -- net ns:/run/netns/ns1 but am not successful with the Python API client.

I tried network_mode=ns:/run/netns/ns1 but got an error Invalid network ns:/run/netns/ns1 instead. The documentation is not clear on this specific use case.

@chnrxn chnrxn changed the title arguments needed for —net /run/netns/{ns} arguments needed for --net /run/netns/{ns} Aug 16, 2023
@umohnani8 umohnani8 self-assigned this Jan 23, 2024
@Edward5hen
Copy link

Hi @chnrxn, thank you for your report. I was unable to reproduce the issue on my end. It appears that commit 65940fc has resolved the problem.
Could you please test it again in your environment and confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants