• MalReynolds@piefed.social
      link
      fedilink
      English
      arrow-up
      15
      ·
      edit-2
      9 days ago

      Damn straight. Yes, docker has rootless now, although I rarely see it in the wild (as I’m converting it to rootless podman), no one seems to care or know. I was using user level quadlets (really like the syntax and structure) before that, and you get SELinux as well. Everything that doesn’t really need it should not have root, pretty much the basic level of Linux (back to Unix) security and Docker is like, ‘Don’t Care, Got Root ;)’.

      • TeaWithDani@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 days ago

        I’ve been converting my entire docker stack to rootless. You run into a number of issues where certain applications simply cannot handle having that limited access, especially on smaller or more niche projects. The documentation doesn’t offer solutions so you are just shit out of luck unless you can troubleshoot it.

    • Scrath@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 days ago

      I’ve tried setting up rootless podman on my machine but I just could not get it to work for some reason. It’s been a while so I unfortunately don’t remember the error message but I think it had something to do with the docker socket being unavailable or podman not having the permission to access it.

  • Sarah Reid@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    9 days ago

    This is the exact trap with agents, they will use whatever privilege is lying around, they don’t stop and think ‘should I?’ like a person might. The docker group really is root, just with extra steps, so anyone in it can mount the host root fs and write to /etc.

    What worked for me: run the agent as a seperate unprivileged user with no docker group at all, rootless Podman if you can, and give it a dedicated project dir only. Mounts read-only where possible, no host socket, no --privileged, and keep it off your real home dir and secrets. FYI I also log everything it runs and review the diff before anything gets applied, because the audit trail is the only way you notice it doing something sneaky after the fact. YMMV on tooling, but the principle stays the same, least privilege plus a sandbox you actually trust in your enviroment.

  • benno@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    8 days ago

    The docker group is root access

    This is really nothing new and every docker installation guide mentions this

  • [object Object]@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 days ago

    I think it was well over a year ago I had my first AI agent do this and I’ve been strictly rootless podman ever since (for everything, not just agents).

    Any AI stuff I run goes in a sandbox (Nono on Linux, sandbox on macOS). I also used my own harness for a long time, which only had a limited set of file operations, sandboxed JavaScript code mode, and everything else was installed as a plugin.

    • sonstwas@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 days ago

      Yea, mapping the guest user ids to 10xxxx user IDs on the host is a elegant and secure solution imo. Not sure if that’s LXC or Proxmox doing tho…

  • UiUiUiUiUi@piefed.nl
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 days ago

    This isn’t a docker issue but an issue of running a non-deterministic process on the host system. If you must run an LLM run it inside a docker container.