From what I have seen, rootless podman seems to take more effort (even if marginal) than rootful one. I want to make a more informed decision for the containers, so I would like to ask.

  1. What is a rootless podman good for? How much does it help in terms of security, and does it have other benefits?
  2. One of the benefits commonly mentioned is for when container is breached. Then, running container on sudo-capable user would give no security benefits. Does it mean I should run podman services on a non-privileged user?

Thank you!

  • someonesmall@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    How would a rogue container be able to access the root directory of the host? Wouldn’t it just be able to access the data on the docker volumes? Thank you.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 day ago

      In an ideal world, sure, but all software has bugs (example vulnerabilities here). Proper security design doesn’t ask “how can X happen?” but “what if X happens?” If you break out of a docker container, you have root access to the system because the docker daemon runs as root.

      With podman, there is no root docker daemon, so you’d also need privilege escalation in addition to breaking out of the container.

      • someonesmall@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 day ago

        Can you provide the required arguments for chroot? I’ve just opened the bash shell of a running container (docker exec -it mycontainer bash) and tried to “break out” using “chroot /”. I can’t access any files of the host.