789
top 50 comments
sorted by: hot top controversial new old
[-] MoonlightFox@lemmy.world 40 points 9 hours ago* (last edited 9 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.

[-] Landless2029@lemmy.world 23 points 8 hours ago
[-] scrubbles@poptalk.scrubbles.tech 5 points 4 hours ago

Yes, yes you really should

[-] OmegaLemmy@discuss.online 3 points 5 hours ago

I said this a year and a half ago and I still haven't, awful decision, I now own servers too so I should really learn them

[-] Landless2029@lemmy.world 2 points 5 hours ago

The worse part is having the gear and STILL not learning/playing with it.

I got stuff to start !selfhosted@kbin.social like an old i5 minipc and even a 64gb i7 pro series laptop...

Theyre just sitting unplugged with mint on them.

[-] Ajen@sh.itjust.works 2 points 5 hours ago

You don't have to ship a second OS just to containerize your app.

[-] alsaaas@lemmy.dbzer0.com 11 points 9 hours ago

Isn't Docker massively insecure when compared to the likes of Podman, since Docker has to run as a root daemon?

[-] chunkystyles@sopuli.xyz 6 points 8 hours ago

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

[-] MoonlightFox@lemmy.world 7 points 8 hours ago* (last edited 8 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.

[-] hemko@lemmy.dbzer0.com 1 points 8 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.

[-] Clent@lemmy.dbzer0.com 1 points 2 hours ago

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

[-] hemko@lemmy.dbzer0.com 1 points 1 hour ago* (last edited 1 hour 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

[-] NocturnalMorning@lemmy.world 1 points 8 hours ago

Always someone who needs to explain and ruin the joke..

[-] Clent@lemmy.dbzer0.com 1 points 2 hours ago

Based on many of the other comments, I don't think most people understood the joke.

[-] Tricky@lemmy.world 8 points 7 hours ago

Not everyone is experienced in the space. I appreciate the reader notes.

[-] Arghblarg@lemmy.ca 72 points 13 hours 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.

[-] Michal@programming.dev 51 points 12 hours ago

Docker is more than a cop out for than one use case. It's a way for quickly deploy an app irrespective of an environment, so you can scale and rebuild quickly. It fixes a problem that used to be solved by VMs, so in that way it's more efficient.

load more comments (8 replies)
[-] ramble81@lemm.ee 15 points 10 hours 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 55 points 13 hours 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.

[-] roofuskit@lemmy.world 19 points 11 hours ago

Yeah, my time is way more valuable than a gigabyte of drive space. In what world is anyone's not today?

[-] milicent_bystandr@lemm.ee 10 points 11 hours ago

Mine, on my 128gb dual boot laptop.

[-] roofuskit@lemmy.world 8 points 9 hours ago

How many docker containers would you deploy on a laptop? Also 128gb is tiny even for an SSD these days .

[-] milicent_bystandr@lemm.ee 1 points 1 hour ago

None, in fact, because I still haven't got in to using docker! But that is one of the factors that pushes it down the list of things to learn.

I've had a number of low-storage laptops, mostly on account of low budget. Ever since taking an 8GB netbook for work (and personal) in the mountains, I've developed space-saving strategies and habits!

[-] SpaceNoodle@lemmy.world 9 points 11 hours ago

It's a gigabyte of every customer's drive space.

load more comments (3 replies)
[-] Zikeji@programming.dev 34 points 12 hours 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.

[-] Toribor@corndog.social 7 points 10 hours ago

I've been really trying to push for more usage of dev containers at my org. I deal with so much hassle helping people install dependencies and deal with bizarre environment issues. And then doing it all over again every time there is turnover or someone gets a new laptop. We're an Ops team though so it's a real struggle to add the additional complexity of running and troubleshooting containers on top of mostly new dev concepts anyway.

[-] jjjalljs@ttrpg.network 1 points 5 hours ago

..what do you mean by using dev containers? Are your people doing development on their host machine?

[-] Zikeji@programming.dev 6 points 10 hours ago

So far I've helped my team of 5 get on them. Some other teams are starting as well. We've got Windows, Linux, and Mac OSX that developers are running on their work machine (for now), and the only container specific issue we ever encounter is port conflicts, which are well documented with easy to change environment variables to control.

The only real caveat right now is we have a bunch of micro services, and so their supporting services (redis, mariadb, etc.) end up running multiple times, so their is some performance loss from that. But they're all designed to be independent, only talking to each other via their API, so the approach works.

load more comments (2 replies)
[-] msage@programming.dev 2 points 9 hours ago

You know, all this talk about these benefits... when PHP has had this for ages, no BS needed.

I'll see myself out.

[-] QuazarOmega@lemy.lol 15 points 12 hours 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

[-] BatmanAoD@programming.dev 5 points 11 hours ago

I agree that it's a "cop-out", but the issue it mitigates is not an individual one but a systemic one. We've made it very, very difficult for apps not to rely on environmental conditions that are effectively impossible to control without VMs or containerization. That's bad, but it's not fixable by asking all app developers to make their apps work in every platform and environment, because that's a Herculean task even for a single program. (Just look at all the compatibility work in a codebase that really does work everywhere, such as vim.)

[-] MehBlah@lemmy.world 7 points 13 hours ago

I'm not a dev exactly. But I got my Linux skills using Slackware and I still have no problem compiling something if there is no package for it. In some cases I will use a appimage(Cura) but for the most part I just install natively. I use ubuntu but always start eliminating snaps on any install and it really doesn't take that long.

load more comments (5 replies)
[-] racemaniac@lemmy.dbzer0.com 4 points 12 hours ago* (last edited 12 hours ago)

I love docker, it of course comes with some inefficiencies, but let's be real, getting an app to run on every possible environment with any possible other app or configuration or.... that could interfere with yours in some way is hell.

In an ideal world, something like docker is indeed not needed, but the past decades have proven beyond a doubt that alas, we don't live in this utopia. So something like docker that just sets up a private environment for the app so that nothing else can interfere with it.... why not? Anything i've got running on docker is just so stable. I never have to worry that any change i do might affect those apps. Updating them is automated, ...

Not wasting my and the developers time in exchange for a bit of computer resources, sounds like a good deal. If we find a better way for apps to be able to run on any environment, that would of course be even better, but we haven't, so docker it is :).

[-] Arghblarg@lemmy.ca 2 points 9 hours ago

Fair enough... I admit I'm a bit of an old curmudgeon, set in my ways. :s

load more comments (1 replies)
[-] ikidd@lemmy.world 6 points 12 hours ago

I had some numpty telling me that installing an application on whatever dog's breakfast distro someone happened to put on an LXC was functionally the same as a shipped docker container for troubleshooting.

[-] OwlPaste@lemmy.world 8 points 13 hours ago

This is a true story

load more comments
view more: next ›
this post was submitted on 09 Jan 2025
789 points (98.2% liked)

Programmer Humor

19910 readers
1774 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS