• @[email protected]
    link
    fedilink
    79
    edit-2
    21 hours ago

    There are another important reason than most of the issues pointer out here that docker solves.

    Security.

    By using containerization Docker effectively creates another important barrier which is incredibly hard to escape, which is the OS (container)

    If one server is running multiple Docker containers, a vulnerability in one system does not expose the others. This is a huge security improvement. Now the attacker needs to breach both the application and then break out of a container in order to directly access other parts of the host.

    Also if the Docker images are big then the dev needs to select another image. You can easily have around 100MB containers now. With the “distroless” containers it is maybe down to like 30 MB if I recall correctly. Far from 1GB.

    Reproducability is also huge efficiency booster. “Here run these this command and it will work perfecty on your machine” And it actually does.

    It also reliably allows the opportunity to have self-healing servers, which means businesses can actually not have people available 24/7.

    The use of containerization is maybe one of the greatest marvels in software dev in recent (10+) years.

    • @[email protected]
      link
      fedilink
      11
      edit-2
      6 hours ago

      Oof. I’m anxious that folks are going to get the wrong idea here.

      While OCI does provide security benefits, it is not a part of a healthly security architecture.

      If you see containers advertised on a security architecture diagram, be alarmed.

      If a malicious user gets terminal access inside a container, it is nice that there’s a decent chance that they won’t get further.

      But OCI was not designed to prevent malicious actors from escaping containers.

      It is not safe to assume that a malicious actor inside a container will be unable to break out.

      Don’t get me wrong, your point stands: Security loves it when we use containers.

      I just wish folks would stop treating containers as “load bearing” in their security plans.

    • @vin
      link
      English
      68 hours ago

      Sounds like an ugly retrofit of bsd jail

    • @[email protected]
      link
      fedilink
      English
      49 hours ago

      Containerized software is huge in the sciences for reproducible research. Or at least it will/should be (speaking as someone adjacent to bioinformatics and genomics)

      • @[email protected]
        link
        fedilink
        English
        1519 hours ago

        I prefer Podman. But Docker can run rootless. It does run under root by default, though.

        • алсааас [she/they]
          link
          fedilink
          2
          edit-2
          1 hour ago

          afaik it’s still using a daemon, compared to Podman being daemonless, right? ofc it’s better to run it in userspace, tho I can’t recall if it limited some of the features or not and whether it was easy to set up

      • @[email protected]
        link
        fedilink
        17
        edit-2
        19 hours ago

        I don’t have in-depth knowledge of the differences and how big that is. So take the following with a grain of salt.

        My main point is that using containerization is a huge security improvement. Podman seems to be even more secure. Calling Docker massively insecure makes it seem like something we should avoid, which takes focus away from the enormous security benefit containerization gives. I believe Docker is fine, but I do use Podman myself, but that is only because Podman desktop is free, and Docker files seem to run fine with Podman.

        Edit: After reading a bit I am more convinced that the Podman way of handling it is superior, and that the improvement is big enough to recommend it over Docker in most cases.

        • алсааас [she/they]
          link
          fedilink
          2
          edit-2
          1 hour ago

          ofc containerisation is still better than running it natively in terms of security (which is why I said “compared to Podman”), but that’s kind of mostly a side effect of it’s main thing: reproducible runtime environments. It’s not rly good security tho afaik and shouldn’t be relied upon in that regard at all, but I don’t know too much about it

      • @[email protected]
        link
        fedilink
        English
        1220 hours ago

        Not only that but containers in general run on the host system’s kernel, the actual isolation of the containers is pretty minimal compared to virtual machines for example.

        • @[email protected]
          link
          fedilink
          4
          edit-2
          6 hours ago

          It amused me that the votes on your comment (a simple factual statement) reflect how many people here vote without knowing what the fuck they’re talking about.

          • @[email protected]
            link
            fedilink
            English
            4
            edit-2
            5 hours ago

            I think many of the people don’t understand the difference between containers vs VMs

        • @[email protected]
          link
          fedilink
          612 hours ago

          … With the tradeoff being containers much more lightweight and having much less overhead than VMs…

        • @[email protected]
          link
          fedilink
          English
          213 hours ago

          What exactly do you think the vm is running on if not the system kernel with potentially more layers.

          • @[email protected]
            link
            fedilink
            English
            20
            edit-2
            13 hours ago

            Virtual machines do not use host kernel, they run full OS with kernel, cock and balls on virtualized hardware on top of the host OS.

            Containers are using the host kernel and hardware without any layer of virtualization