skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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:

    Note: All podman network commands are for rootfull containers only.

    Technically, the container itself does not have an IP address, because without root privileges, network device association cannot be achieved

    When using Podman as a rootless user, the network is setup automatically. The container itself does not have an IP Address, because without root privileges, network association is not allowed. You will also see some other limitations.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search