In a comment over at !selfhosted@lemmy.world someone wrote:

Containers are not a security barrier. They cannot be, they never will be.

I’m no expert but my mental model of containers was different in that I thought containerized processes live in somehow separate environments, at least filesystem- and network-wise.

I run self-hosted services in containers on my server to isolate them from each other, and now and then binaries I don’t fully trust (things like suspected slop code or not well known python libraries) in containers on my laptop.

Does someone with more technical knowledge about how containers work feel like explaining whether that is a bad idea and if so why? That would be highly appreciated.

Edit: missing words and punctuation.

Edit 2: I would like to thank everyone who took the time to reply. My key take aways are that I will move my self-hosted services into VMs for proper isolation, but that it’s probably fine to use a container when I want to make sure an LLM doesn’t accidentally rm -rf my laptop system when it gets stuck.

  • corsicanguppy@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    24 hours ago
    1. Containerization is not a security improvement, since it strongly depends on the sandboxing (and the trends are terrible for that)
    2. Containerization frustrates validation of the installed state of the system. This means you can’t answer “how do you know” when you need to.
    3. Containerization adds a layer of unnecessary tech. I’m not saying it’s a bad thing, just something you don’t need.

    I say this as a former OS security guy for Unix and Linux – like, as a job, working for a very well-known global vendor.

    • majster@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      15 hours ago

      Is Linux KVM good enough then? I know it depends on HW features for isolation, but so does normal process isolation.