How to manage Podman as a non-root user like with Docker? #24074
Replies: 3 comments 8 replies
-
If you want to leak podman.socket into container you need to disable SELinux separation, since this is a very dangerous thing from a security point of view. You would need to do same thing with Docker, if it did not have SELinux disabled by default. podman run --security-opt label=disable ... |
Beta Was this translation helpful? Give feedback.
-
I'm not sure that you can leave it out of the discussion, since it is the root of your problems - the "old way" is unsupported. For Docker, running as root (with sudo) is the default - setting up the docker group is optional, setting up rootless is optional:
For Podman, it is the daemon and the socket that is optional - the default is to run daemonless, at least when running locally. |
Beta Was this translation helpful? Give feedback.
-
I have been writing about how bad an idea this is going back to 2015. https://projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel/ I believe this is the most dangerous thing you can do on a Linux System, more dangerous then setting up sudo without password, so podman should not encourage it when there are better ways to handle it. |
Beta Was this translation helpful? Give feedback.
-
I've been using PyCharm for developing and debugging Python application in container with docker configured to be managed as a non-root user using steps shown at https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
I wanted to move from docker to podman but can't find analogues information for podman. Changing docker to podman results in PyCharm not being able to communicate with podman using podman's unix socket as it's only accessible by root.
I would like to leave the whole subject of using rootless podman out of discussion as it brings its own set of problems (mainly around network configuration).
Here is (sadly minimal) documentation on using PyCharm with podman – https://www.jetbrains.com/help/pycharm/podman.html
Beta Was this translation helpful? Give feedback.
All reactions