• SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    28
    ·
    23 hours ago

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

    • kunaltyagi@programming.dev
      link
      fedilink
      arrow-up
      19
      ·
      1 day ago

      This was known for a decade now? That’s why adding a user to docker group was always an additional step with a warning

      And also why podman works the way it does

  • BlueKey@fedia.io
    link
    fedilink
    arrow-up
    55
    ·
    1 day 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
      10
      ·
      1 day 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
        4
        ·
        6 hours ago

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

        • GreenKnight23@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          6 hours ago

          keep telling yourself that. if it was 2006 I would say you’re right, but 20 years of corporate neglect and abuse has caused many developers to age out and not really give a shit anymore.

          young devs don’t want to just “fork it”, they want to make a better product. to sell it. to IBM (or entities like them).

          so yeah. you keep trusting that IBM bear in the corner won’t maul you when you take a nap.

          I’ll stick with docker, the solution that outright refused to bend a knee to the worse corporate slaver in modern history.

          • Ghoelian@piefed.social
            link
            fedilink
            English
            arrow-up
            5
            ·
            4 hours ago

            ¯\_(ツ)_/¯ I have faith in the open-source community. So far that’s turned out pretty well.

          • locuester@lemmy.zip
            link
            fedilink
            English
            arrow-up
            41
            arrow-down
            3
            ·
            1 day 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
              50
              ·
              1 day 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.

          • tabular@lemmy.world
            link
            fedilink
            English
            arrow-up
            9
            ·
            1 day ago

            Sudo can/usually does ask for password - but if you’re feeling lucky you can use sudo without a password.

            (Currently doing that after repeatedly failing to install an OS and have not yet felt compelled to change it back).

          • Zikeji@programming.dev
            link
            fedilink
            English
            arrow-up
            25
            ·
            1 day 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.

      • racemaniac@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        3
        ·
        7 hours ago

        Suppose we all did read the docs. How possible is it with the complexity of a modern system to really take literally everything in account, and understand the implications oof everything to keep your system safe? It’s great that it’s documented, but if security isn’t the default option, it will lead to issues, and everything has become so complex, that imo correctly managing everything is literally impossible… This is a systemic issue, not a user issue.

        • Lemmert@reddthat.com
          link
          fedilink
          arrow-up
          1
          ·
          4 hours ago

          I don’t think it would’ve been an issue if they just put a warning in the getting started section in the docs (or if they just have secure defaults to begin with). But currently there’s no mention of it. It took almost a year for me to realise that I was running “production ready code” in root

    • YeahToast@aussie.zone
      link
      fedilink
      arrow-up
      1
      ·
      6 hours ago

      How do you find running it as rootless? I have enough grief with docker as is… Don’t really feel the need to further complicate things by going off the status quo… but I’m guessing it’s somewhat more secure.

    • Ghoelian@piefed.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      On the docker side, yes, it runs as root by default. If you want rootless containers, try podman.

      For Claude code, no, by default it asks for every command if it’s allowed to run. Either this user allowed all docker commands, allowed all commands, or allowed the to ai decide if the command is safe or not by itself (yes this is a real feature). (If this is Claude code, which I can’t tell if it is)