this post was submitted on 09 Jan 2025
990 points (98.1% liked)

Programmer Humor

20147 readers
1196 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
 
top 50 comments
sorted by: hot top controversial new old
[–] Arghblarg@lemmy.ca 80 points 2 weeks ago (11 children)

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.

[–] SpaceNoodle@lemmy.world 71 points 2 weeks ago (1 children)

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 26 points 2 weeks ago (3 children)

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

[–] SpaceNoodle@lemmy.world 18 points 2 weeks ago (4 children)

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

load more comments (4 replies)
[–] milicent_bystandr@lemm.ee 16 points 2 weeks ago (3 children)

Mine, on my 128gb dual boot laptop.

[–] roofuskit@lemmy.world 9 points 2 weeks ago (3 children)

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

load more comments (3 replies)
load more comments (2 replies)
[–] fallingcats@discuss.tchncs.de 3 points 2 weeks ago* (last edited 2 weeks ago)

A gigabyte of drive space is something like 10-20 cents on a good SSD.

[–] Michal@programming.dev 66 points 2 weeks ago (8 children)

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)
[–] Zikeji@programming.dev 37 points 2 weeks ago (2 children)

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 8 points 2 weeks ago (5 children)

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.

[–] Zikeji@programming.dev 5 points 2 weeks 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 (4 replies)
load more comments (1 replies)
[–] ramble81@lemm.ee 20 points 2 weeks ago (1 children)

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!”

load more comments (1 replies)
[–] QuazarOmega@lemy.lol 18 points 2 weeks 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 7 points 2 weeks 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.)

[–] racemaniac@lemmy.dbzer0.com 7 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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 :).

load more comments (1 replies)
[–] MehBlah@lemmy.world 7 points 2 weeks ago (5 children)

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)
load more comments (3 replies)
[–] MoonlightFox@lemmy.world 70 points 2 weeks ago* (last edited 2 weeks ago) (10 children)

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 39 points 2 weeks ago (3 children)
[–] mugdad1@lemm.ee 1 points 3 days ago (1 children)

i said same thing and in 2 days deployed 4 conatainers that fixed a problems in my life so thats goood

[–] Landless2029@lemmy.world 2 points 3 days ago (1 children)

What did you deploy?

I'm messing with self-hosting a LMM with a web front end right now.

[–] mugdad1@lemm.ee 1 points 3 days ago (1 children)

actully i started with it 2 days ago so i have on my device something called adguardhome its for blocking ads and a dns and i have metube which is webui for ytdlp and memos and photo prism im still messing with them i started knowing how to see the proccess and stop and run and see logs so i gained some knowledge

[–] Landless2029@lemmy.world 2 points 3 days ago (1 children)

Oh I'm totally getting metube. I use ytdlp with a script

[–] mugdad1@lemm.ee 1 points 3 days ago

btw it doesn't have advanced configs so give it a try also their are some others you can try i have metube cuz my dad wants somthing easy for him just to put youtube link and download this is why i used it for him

[–] scrubbles@poptalk.scrubbles.tech 11 points 2 weeks ago

Yes, yes you really should

[–] OmegaLemmy@discuss.online 8 points 2 weeks ago (6 children)

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

load more comments (6 replies)
[–] alsaaas@lemmy.dbzer0.com 16 points 2 weeks ago (3 children)

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

[–] MoonlightFox@lemmy.world 12 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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.

load more comments (1 replies)
[–] chunkystyles@sopuli.xyz 10 points 2 weeks ago (1 children)

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

load more comments (1 replies)
[–] hemko@lemmy.dbzer0.com 9 points 2 weeks ago (4 children)

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.

[–] stetech@lemmy.world 5 points 2 weeks ago

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

[–] MajorHavoc@programming.dev 4 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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.

[–] hemko@lemmy.dbzer0.com 4 points 2 weeks ago* (last edited 2 weeks ago)

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

load more comments (2 replies)
[–] MajorHavoc@programming.dev 11 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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.

load more comments (1 replies)
[–] vin@lemmynsfw.com 6 points 2 weeks ago

Sounds like an ugly retrofit of bsd jail

[–] Ajen@sh.itjust.works 5 points 2 weeks ago

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

load more comments (4 replies)
[–] OwlPaste@lemmy.world 8 points 2 weeks ago

This is a true story

[–] skuzz@discuss.tchncs.de 7 points 2 weeks ago (1 children)

Now if only Docker could solve the "hey I'm caching a layer that I think didn't change" (Narrator: it did) problem, that even setting the "don't fucking cache" flag doesn't always work. So many debug issues come up when devs don't realize this and they're like, "but I changed the file, and the change doesn't work!"

docker system prune -a and beat that SSD into submission until it dies, alas.

load more comments (1 replies)
[–] ikidd@lemmy.world 6 points 2 weeks 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.

[–] mehdi_benadel@lemmy.balamb.fr 5 points 2 weeks ago
load more comments
view more: next ›