Live data from Hacker News

Run More Stuff in Docker

jonathan.bergknoff.com

111–120 of 293 posts

Re: Run More Stuff in Docker

#111
I find that the time taken to get everything working means I have less time to get work done. The busywork does give me a sense of achievement, but that is not the achievement that matters. It's premature optimization to sandbox an application by default unless there is a pressing reason to do so.

For e.g. zoom and hugo don't really change the filesystem or OS settings beyond the folders they output to. I don't see a reason the have them sandboxed personally.

Re: Run More Stuff in Docker

#112

Docker is intimately tied to Linux. It it only "cross platform" in that it can use a VM (Mac, WSL2) or flaky compat layers (FreeBSD). If software embraces Docker, it effectively excludes other OSes, like Windows, BSDs, Haiku, Fuschia, etc.

And even then trying to run Docker on Fedora will prompt you to turn off Security-Enhanced Linux features or use Podman instead. So it’s really like, what, 1/2 or 2/3 or Linux support

What? Why would it prompt this? Docker supports SELinux.

Re: Run More Stuff in Docker

#113
post #110
post #100

Earlier quoted context omitted.

I am so glad I can read something like this in public. When I say stuff like this in job interviews, I get eye rolls and don't end up getting a job. The industry is so far up its ass lately, no one even dare stating the facts in public. /rant

Now talk about deploying something NOT using Kubernetes. The double whammy. Now you're looking like an insane 100 year old graybeard fossil.

Or overuse of microservices

Re: Run More Stuff in Docker

#114
post #44

Earlier quoted context omitted.

Absolutely. Most Dockerfiles I come across are very much not written in a robustly reproducible way. The stacking filesystems model is really not very flexible (if you want to compose two docker images with dissimilar bases to be used together you have to resort to manually specifying which files to copy across from each base). Use of OS features to achieve its ends means the docker daemon itself requires far more pr…

Yeah, any Docker file that starts with `apt update; apt dist-upgrade` is an instant fail. You might be interested in this fascinating exploration of attempting to bend Docker into better caching and composition by injecting blocks of Nix packages as individual layers: https://grahamc.com/blog/nix-and-layered-docker-images

I think the base images that are commonly used are just as bad; likely some random snapshot of upstream repositories at arbitrary times. You can refer to the sha256 of base images to avoid things changing, but I've never seen anyone do that. (The advice is "never use 'latest' because that could change out from under you", but other tags are just as mutable, and so that isn't real advice. You can follow the advice and have something just as bad happen.)

The thing the upstream Linux distributions are missing are a lockfile with the hashes of installed packages. Programming languages figured this out (go.sum, package-lock.json, etc.) but distributions have not. Thus, people are often running "whatever" in production, because they simply don't have the ability to lock dependencies properly.

I assume Nix solves this problem, and people should pay attention to how important it actually is.

Re: Run More Stuff in Docker

#115
> On a Mac, there is a major performance hit whenever you do disk IO in a bind mount (i.e. voluming a directory of the host system into the container). Working without bind mounts is extremely limiting.

In my opinion, this is a big enough issue as to throw the whole idea of “Docker as cross-platform platform/target” into major question.

When running more than a few containers on macOS, the performance is so bad it becomes almost unusable.

Re: Run More Stuff in Docker

#116
post #110

Earlier quoted context omitted.

Now talk about deploying something NOT using Kubernetes. The double whammy. Now you're looking like an insane 100 year old graybeard fossil.

Or overuse of microservices

^ this. Proliferation of many microservices and repos is a trend I’m trying (and failing) to buck at my current job.

The next time I have to copy/paste the same utility to a new microservice because [insert corporate reason] I’m going to scream.

Re: Run More Stuff in Docker

#117

Earlier quoted context omitted.

But the 73m -> 500m is still true, right?

Depends entirely on how the image is built. You can have a Docker image that contains nothing but the application binaries, but then the question is why use Docker at all.

Isolation and reproducibility

Re: Run More Stuff in Docker

#118
post #44

For end user devices, I much prefer Nix/NixOS [1] for this kind of thing. With Flakes [2] (experimental feature), you get full reproducibility. The documentation is spotty and there is a considerable learning curve, but I've switched to NixOS on my laptop and desktop early this year and am mostly very happy with it. That doesn't cover sandboxing though. I would actually agree that sandboxing / restricting application…

Absolutely. Most Dockerfiles I come across are very much not written in a robustly reproducible way. The stacking filesystems model is really not very flexible (if you want to compose two docker images with dissimilar bases to be used together you have to resort to manually specifying which files to copy across from each base). Use of OS features to achieve its ends means the docker daemon itself requires far more pr…

Honestly given how little reproducibility there is in like 80% of the Dockerfiles I've seen in the wild it astounds me how this became a solution for packaging at all.

Are solutions like source2image, jib, or the nix dockerTools.buildImage method gaining steam?

Re: Run More Stuff in Docker

#119
post #73

I wish there were real / usable Windows containers out there. I'd love to spin up a quick sandbox to run a MSVC / MSBuild, but the smallest "image" in Windows-land for that is 12Gb. Still use Docker alongside WSL2 for purely-Linux stuff like some node.js scripts or python things that don't need GPU.

I'm looking at startup ideas in this area. Would you be interested in describing your pain points and use case?

Re: Run More Stuff in Docker

#120
I've been looking at startup ideas in this space, either as a Citrix replacement (run applications locally in a secure enclave instead of running them in the cloud and paying for vms) or as a way of bringing the benefits of containers to desktop apps and traditional IT (build containers for deployments not images). Would love to hear from anyone with use cases or pain points.
Post reply on HN