1074
top 50 comments
sorted by: hot top controversial new old
[-] skuzz@discuss.tchncs.de 4 points 3 hours ago

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.

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

[-] MajorHavoc@programming.dev 11 points 8 hours ago* (last edited 8 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.

[-] areyouevenreal@lemm.ee 1 points 2 hours ago

I've tried making this argument before and people never seem to agree. I think Google claims their Kubernetes is actually more secure than traditional VMs, but how true that really is I have no idea. Unfortunately though there are already things we depend upon for security that are probably less secure than most container platforms, like ordinary unix permissions or technologies like AppArmour and SELinux.

[-] vin@lemmynsfw.com 6 points 10 hours ago

Sounds like an ugly retrofit of bsd jail

[-] AnarchistArtificer@slrpnk.net 4 points 12 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)

[-] Landless2029@lemmy.world 47 points 22 hours ago
[-] scrubbles@poptalk.scrubbles.tech 17 points 18 hours ago

Yes, yes you really should

[-] OmegaLemmy@discuss.online 14 points 18 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

[-] BlackPenguins@lemmy.world 2 points 8 hours ago* (last edited 8 hours ago)

There's a udemy course by Maximilian that is only $20 that helped me immensely. Highly recommend.

[-] Landless2029@lemmy.world 7 points 18 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.

[-] mynameisigglepiggle@lemmy.world 2 points 14 hours ago

You would be using them if you installed arch

/s

[-] Aceticon@lemmy.dbzer0.com 1 points 8 hours ago

Well, mucking about with configuration on a computer is a form of entertainment hence its "use" in a broader sense...

load more comments (3 replies)
[-] alsaaas@lemmy.dbzer0.com 21 points 23 hours ago

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

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

[-] alsaaas@lemmy.dbzer0.com 2 points 5 hours ago* (last edited 3 hours 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

[-] chunkystyles@sopuli.xyz 14 points 22 hours ago

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

[-] alsaaas@lemmy.dbzer0.com 2 points 5 hours ago* (last edited 3 hours 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

load more comments (6 replies)
load more comments (4 replies)
[-] Arghblarg@lemmy.ca 87 points 1 day 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.

[-] mlg@lemmy.world 4 points 5 hours ago

You ever notice how most docker images are usually based from Ubuntu, the arguably worse distro to use for dependency management.

The other core issue is people using docker as a configuration solution with stuff like compose.

If I want containers, I usually just use LXC.

Only docker project I liked was docker-osx which made spinning up OSX VMs easy, but again it was basically 80% configuration for libvirt.

[-] Aceticon@lemmy.dbzer0.com 3 points 8 hours ago* (last edited 8 hours ago)

It eliminates the dependency of specific distributions problem and, maybe more importantly, it solves the dependency of specific distribution versions problem (i.e. working fine now but might not work at all later in the very same distribution because some libraries are missing or default configuration is different).

For example, one of the games I have in my GOG library is over 10 years old and has a native Linux binary, which won't work in a modern Debian-based distro by default because some of the libraries it requires aren't installed (meanwhile, the Windows binary will work just fine with Wine). It would be kinda deluded to expect the devs would keep on updating the Linux native distro (or even the Windows one) for over a decade, whilst if it had been released as a Docker app, that would not be a problem.

So yeah, stuff like Docker does have a reasonable justification when it comes to isolating from some external dependencies which the application devs have no control over, especially when it comes to future-proofing your app: the Docker API itself needs to remain backwards compatible, but there is no requirement that the Linux distros are backwards compatible (something which would be much harder to guarantee).

Mind you, Docker and similar is a bit of a hack to solve a systemic (cultural even) problem in software development which is that devs don't really do proper dependency management and just throw in everything and the kitchen sink in terms of external libraries (which then depend on external libraries which in turn depend on more external libraries) into the simplest of apps, but that's a broader software development culture problem and most of present day developers only ever learned the "find some library that does what you need and add it to the list of dependencies of your build tool" way of programming.

I would love it if we solved what's essentially the core Technical Architecture problem of in present day software development practices, but I have no idea how we can do so, hence the "hack" of things like Docker of pretty much including the whole runtime environment (funnilly enough, a variant of the old way of having your apps build statically with every dependency) to work around it.

[-] Michal@programming.dev 70 points 1 day 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)
[-] SpaceNoodle@lemmy.world 75 points 1 day 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 27 points 1 day ago

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

[-] fallingcats@discuss.tchncs.de 3 points 12 hours ago* (last edited 12 hours ago)

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

load more comments (13 replies)
[-] Zikeji@programming.dev 44 points 1 day 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.

load more comments (7 replies)
[-] ramble81@lemm.ee 24 points 1 day 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!”

[-] AtHeartEngineer@lemmy.world 1 points 5 hours ago* (last edited 5 hours ago)

I'd argue that's just a ripple effect of being a bad dev, not necessarily the tools fault, but I do get where you are coming from. But also vulnerabilities in some package in a container would be isolated to that container without a further exploit chain

load more comments (11 replies)
load more comments
view more: next ›
this post was submitted on 09 Jan 2025
1074 points (98.4% liked)

Programmer Humor

19932 readers
1254 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