• Zikeji@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 months ago

            Or don’t give your user docker and use sudo to use the docker CLI to get the same effect. Hell, you could even alias docker as sudo docker to get the same feel.

          • locuester@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 months ago

            Docker does by default - it only works if you use sudo. But the docs tell you to add yourself to the docker group (which requires sudo to do). Then running docker doesn’t require sudo anymore.

            • squaresinger@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              3 months ago

              Yeah, that’s a terrible decision in the docs. Don’t ever add a path where anything on the shell can execute user-modifyable code as root.

              As soon as you do that, you lose any protection that comes from separating root users and non-root users. Because now any malicious program can just use docker to elevate its code to root.

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    This is your regular reminder that docker isn’t a sandboxing solution and shouldn’t be treated as one.

  • BlueKey@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Podman for the rescue. Runs fully under current user pribileges, so no sudo or other root-privileges needed to run containers.
    (Especially useful for devs who want containers but should not get sudo.)

    • GreenKnight23@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      there’s just that pesky IBM thing that’s constantly hanging around in the back waiting to pull the rug you’re standing on.

      • Ghoelian@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        It’s all open source. If they do that it will just get forked, I don’t really see the issue.