• MoonlightFox@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    25 days 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.

    • MajorHavoc@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      24 days 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.

  • Arghblarg@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    Call me crusty, old-fart, unwilling to embrace change… but docker has always felt like a cop-out to me as a dev. Figure out what breaks and fix it so your app is more robust, stop being lazy.

    I pretty much refuse to install any app which only ships as a docker install.

    No need to reply to this, you don’t have to agree and I know the battle has been already lost. I don’t care. Hmmph.

    • QuazarOmega@lemy.lol
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      Docker or containers in general provide isolation too, not just declarative image generation, it’s all neatly packaged into one tool that isn’t that heavy on the system either, it’s not a cop out at all.

      If I could choose, not for laziness, but for reproducibility and compatibility, I would only package software in 3 formats:

      • Nix package
      • Container image
      • Flatpak

      The rest of the native packaging formats are all good in their own way, but not as good. Some may have specific use cased that make them best like Appimage, soooo result…
      Yeah, no universal packaging format yet

    • Zikeji@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      25 days ago

      If this is your take your exposure has been pretty limited. While I agree some devs take it to the extreme, Docker is not a cop out. It (and similar containerization platforms) are invaluable tools.

      Using devcontainers (Docker containers in the IDE, basically) I’m able to get my team developing in a consistent environment in mere minutes, without needing to bother IT.

      Using Docker orchestration I’m able to do a lot in prod, such as automatic scaling, continuous deployment with automated testing, and in worst case near instantaneous reverts to a previously good state.

      And that’s just how I use it as a dev.

      As self hosting enthusiast I can deploy new OSS projects without stepping through a lengthy install guide listing various obscure requirements, and if I did want to skip the container (which I’ve only done a few things) I can simply read the Dockerfile to figure out what I need to do instead of hoping the install guide covers all the bases.

      And if I need to migrate to a new host? A few DNS updates and SCP/rsync later and I’m done.

    • ramble81@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      I hate that it puts package management in Devs hands. The same Devs that usually want root access to run their application and don’t know a vulnerability scan for the life of them. So now rather than having the one up to date version of a package on my system I may have 3 different old ones with differing vulnerabilities and devs that don’t want to change it because “I need this version because it works!”

    • SpaceNoodle@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      Why put in a little effort when we can just waste a gigabyte of your hard drive instead?

      I have similar feelings about how every website is now a JavaScript application.