I am running a virtual environment on CentOS with podman.
When I used the --net
option of the podman run command, I get an error.
[user@server ~]$ podman run --net slirp4netns:port_handler=slirp4netns -p 1080:80 -d --name web nginx
Error: cannot join CNI networks if running rootless: invalid argument
Is this option unavailable?
Or is there a problem with the way the options are specified?
Please tell me solution.
I used this site as a reference for the command.
This is the configuration of the server.
[user@server ~]$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
[user@server ~]$ podman -v
podman version 2.0.6
2
Answers
The port_handler option requires Podman >= 2.1.0, which isn’t released at this moment: https://github.com/containers/podman/commit/d86bae2a01cb855d5964a2a3fbdd41afe68d62c8
You can use that option if you compile Podman from its master branch.
I find this link quite helpful to see rootless communication :
I am not sure if you have seen this link before or even if it is helpful to you at this instance. But, in view of helping others out, I think the blog post quotes the following helpful statements: