News for hackers. Stuff that matters.
Re:Ask HN: What's the worst piece of software you use everyday? by etaioinshrdlu on Saturday July 11, 2020 @01:34PM (#23803957)
Docker.

I use it and love it every day in both dev and prod, but I also really kind of hate it.

I'll keep my complaints short.

There should not be a system-wide daemon. (Or any daemon).

It should not require root at all (no setuid either).

From outside the container, the container and its processes should be a single process (with threads). (Like glueing a bunch of processes together.)

The containers should be nest-able to arbitrary depth without performance loss (at least to say, hundreds of nestings deep.)

Docker-compose should not exist, instead it should be replaced by nesting of containers.

Basically, I think it needs to follow the UNIX philosophy better by providing simple abstractions that can be combined easily. The containers would visually look a bit more like an old virtual machine (single process) than our current containers.

These changes probably require a bunch of kernel hacking, but I think it would be worth it long-term for a cleaner architecture.

It appears there are some movements into this direction thanks to podman, but it's really not there yet, especially with nesting.

Also, it wouldn't really be a product at all but just a built-in tool on Linux systems.

Re:Ask HN: What's the worst piece of software you use everyday? by btilly on Saturday July 11, 2020 @03:12PM (#23804884)
If you want more complaints, and well informed ones at that, read https://www.linkedin.com/pulse/containers-future-ian-eyberg/.

I particularly love the quote, The kernel developers view of the docker community is that in the rare case they can actually formulate the question correctly they usually don't understand the answer.

There is only so much that you can say to clarify things to someone who is thinking about everything wrong and doesn't realize it. :-(

Re:Ask HN: What's the worst piece of software you use everyday? by aloer on Saturday July 11, 2020 @06:36PM (#23806742)
That article seems overly critical about young developers that don't know it any better because they grew up on containers.

I guess I am one of those so I got to ask, is the proposed solution of unikernels something we had before but lost in favor of containers, or is it something completely new anyways?

It does look like it might be the latter so why blame developers for using containers due to lack of choice? If unikernels are better and just as easy to use then I am sure people will convert.

He blames a lot on marketing and marketing lies but his company (https://nanovms.com/) seems to make it just as hard to figure out what's going on with the apparently only option being a schedule a demo button.

Come on, I remember Docker being that fancy new thing that people at university taught themselves and to each other around ~2014/2015. That hype was well deserved and if you want to compete with that you can't just decide to brush it off as wrong and misguided.

At the risk of pointing out that I also might be one of those that the quote above is referring to, I gotta ask:

Is there a technical reason why I shouldn't be able to eventually just replace Docker with a micro or unikernel? Same or similar style of image definition, completely different runtime technology?

Isn't it up to the kernel and platform developers to build the tools to make that happen comfortably for all of us naive container users?

Re:Ask HN: What's the worst piece of software you use everyday? by kubanczyk on Saturday July 11, 2020 @07:40PM (#23807205)
> Is there a technical reason why I shouldn't be able to eventually just replace Docker with a micro or unikernel?

Many legacy pre-docker apps were able to run inside docker without any dev work.

Very few apps would run on unikernel without dev work (porting). It's a different kernel after all.

Re:Ask HN: What's the worst piece of software you use everyday? by listennexttime on Saturday July 11, 2020 @08:36PM (#23807556)
I don't know the author, or Denis, but Denis in the comments is right. This is exactly the kind of pseudo-intellectual, inflammatory contrarian opinion that I'm unsurprised to see upvoted.

This article completely conflates containers, orchestrators and schedulers in every aspect of discussion. Something will schedule and orchestrate these microVMs. Something with orchestrate secret manifestation inside those VMs. Something with operate on the host to supervise the VMs (which necessarily will have access to the guests).

So far, every microVM platform with any adoption uses Kubernetes to orchestrate. I don't know, maybe someone is running Kata on Nomad or something, but I've not heard of it. And so far, most (all?) microVM implementation utilizes namespaces and cgroups either inside/outside the VM or both. This includes Chromium's use of OCI in Crostini (their Linux-VM-on-ChromeOS).

Whatever comes along and replaces Kubernetes will push the envelope and will reduce the default blast-radius, will undoubtedly entirely rethink how authorization and namespacing work. The core would be much more minimal. And thousands of lines of generated Go would be replaced with <use your imagination>. And progress will have happened.

I get it. Hating k8s is cool. I hate it too, for a whole myriad of reasons. But it's actually frustrating how bombastic and off the mark that article manages to be. And it's too bad, if it had just stuck with "Kubernetes isn't the future, and actually understood the problems with it, it could've been a decent rant. As-is, I think it does a pretty poor job of justifying the title. (And so far, microVM workloads look to be worse for "image" security than Docker, as the tooling (outside of Nix|Guix) is somehow even worse.)

Re:Ask HN: What's the worst piece of software you use everyday? by breatheoften on Saturday July 11, 2020 @04:54PM (#23805865)
Interesting thread.

Is there a microvm that can run chromium with puppeteer?

I've been thinking that server side chromium might actually turn into a pretty badass application server platform ... security, async, remote debug, webasm for cross platform secure binaries ...

Some efficient infrastructure for deploying is needed -- but should be far easier to create a fast server runtime for puppeteer+chromium than it is to create a generic container execution environment ... -- so the microvm approach seems like the right one for what i want ...

Re:Ask HN: What's the worst piece of software you use everyday? by reichardt on Saturday July 11, 2020 @06:00PM (#23806479)
Re:Ask HN: What's the worst piece of software you use everyday? by lostlogin on Saturday July 11, 2020 @08:41PM (#23807585)
Thanks - it is good. Tangential - in a thread about bad software, having a link to LinkedIn is quite funny. It’s taken about 10 years but I think I’ve finally detached from their bs.
Re:Ask HN: What's the worst piece of software you use everyday? by keeganpoppen on Sunday July 12, 2020 @12:10AM (#23808731)
oh man, the replies to that post are absolute cancer, though. it makes youtube and reddit look like a Parisian salon...
Re:Ask HN: What's the worst piece of software you use everyday? by baddox on Saturday July 11, 2020 @02:58PM (#23804741)
Docker is also essentially completely broken on MacOS and has been for years. The performance penalty on anything doing I/O is like 5x, and it tends to completely hammer my CPU. There are tons of internet discussions, so it appears to not be just me.
Re:Ask HN: What's the worst piece of software you use everyday? by yjftsjthsd-h on Saturday July 11, 2020 @03:33PM (#23805114)
Isn't that inherent because Docker needs a Linux kernel, so running it on Darwin has a hard requirement on virtualization and running an entire guest operating system?
Re:Ask HN: What's the worst piece of software you use everyday? by jlokier on Saturday July 11, 2020 @03:36PM (#23805150)
Virtualization and even running a guest kernel and OS isn't 5x expensive on the CPU, so the problem is not virtualization per se.

Perhaps the problem is Darwin.

Re:Ask HN: What's the worst piece of software you use everyday? by arp242 on Sunday July 12, 2020 @02:03AM (#23809230)
Docker abstracts and re-implements a lot of the filesystem and IO stuff; almost all of the issues (often outright bugs) I've had with Docker on Linux are related to that, too.
Re:Ask HN: What's the worst piece of software you use everyday? by yjftsjthsd-h on Saturday July 11, 2020 @03:43PM (#23805235)
I know it's not bad on CPU, but I thought it took more of a hit on I/O? Granted, I suspect that some of this is indeed some issue with Darwin itself, or at least poor integration with it.
Re:Ask HN: What's the worst piece of software you use everyday? by jlokier on Saturday July 11, 2020 @04:17PM (#23805529)
I agree, I/O can be pretty expensive.

It depends quite a lot on the kind of I/O and how it's implemented, so design choices matter.

If there's a full Linux kernel inside the VM, then you may as well do I/O inside the VM as well, using something like virtio and a ringbuffer of async block device commands to the host, or at least batching them. That will be quicker than relaying every POSIX file operation synchronously to the host, because the number of VM exits is much lower in the former case.

Re:Ask HN: What's the worst piece of software you use everyday? by znpy on Saturday July 11, 2020 @06:41PM (#23806782)
That's MacOS' fault, in fairness. MacOS does not support containers or the Linux abi in general so you're forced to run docker containers in a Linux VM, with all the CPU and I/O penalties.
Re:Ask HN: What's the worst piece of software you use everyday? by mr_toad on Saturday July 11, 2020 @07:13PM (#23807020)
It’s MacOS’s fault for not being Linux?
Re:Ask HN: What's the worst piece of software you use everyday? by Rapzid on Saturday July 11, 2020 @07:59PM (#23807320)
Microsoft added native container support to Windows. Apple has chosen to essentially ignore them.

Microsoft is a much more developer focused company IMHO. Still kinda astonishing how many developers choose MacOS.

Re:Ask HN: What's the worst piece of software you use everyday? by symlinkk on Saturday July 11, 2020 @09:14PM (#23807762)
Correct me if I’m wrong but the Windows “native container support“ is only for Windows images right? Which no one uses, since 99% of popular software like Redis, Nginx, whatever are for Linux
Re:Ask HN: What's the worst piece of software you use everyday? by snypox on Sunday July 12, 2020 @04:04AM (#23809714)
I always wondered what percentage of apps in production are using Windows images compared to Linux.
Re:Ask HN: What's the worst piece of software you use everyday? by mr_toad on Saturday July 11, 2020 @09:00PM (#23807694)
There’s probably not a huge demand for native MacOS containers. Even MacOS VMs are a rarity.
Re:Ask HN: What's the worst piece of software you use everyday? by ben-schaaf on Saturday July 11, 2020 @11:36PM (#23808585)
MacOS VMs are only a rarity because you're only allowed to run them on Apple hardware. If that wasn't the case we'd likely even have cloud support for the platform and Cross-Platform development would be significantly easier.
Re:Ask HN: What's the worst piece of software you use everyday? by znpy on Monday July 13, 2020 @03:42AM (#23818140)
Well, yes?
Re:Ask HN: What's the worst piece of software you use everyday? by invisible on Saturday July 11, 2020 @11:23PM (#23808542)
I’ve done way too much investigation into this. They are fixing these issues finally[0] (I’m mc0 mentioned in the thread). It does absolutely suck and is mostly caused by hacks to support macOS inotify event propagation into the docker VM. They are also working on making a different system for syncing data using Mutagen[1] that should fix this completely. That being said, it is very usable today depending on the workload.

0: https://github.com/docker/roadmap/issues/12#issuecomment-652...

1: https://github.com/docker/roadmap/issues/7

Re:Ask HN: What's the worst piece of software you use everyday? by the8472 on Saturday July 11, 2020 @05:46PM (#23806348)
If it's a docker problem maybe you're running it with the vfs storage driver which copies every layer every time instead of using overlayfs? If not then it may be a problem with the virtualization solution, not docker itself. VM overhead shouldn't be 5x, not even for IO. Unless you're trying to mount parts of the host filesystem, that's slow with pretty much any virtualization solution, perhaps barring virtio-fs, but that's probably not supports on osx
Re:Ask HN: What's the worst piece of software you use everyday? by wadkar on Saturday July 11, 2020 @04:39PM (#23805718)
I thought those were (partially?) addressed (or still ongoing?) with the use of bhyve/xhvye?
Re:Ask HN: What's the worst piece of software you use everyday? by GordonS on Saturday July 11, 2020 @01:59PM (#23804175)
I agree about the daemon. Podman is a daemonless alternative, though I've never used it myself.

Strongly disagree about Docker Compose though - I actually really like the ability to compose a stack of different containers together with some simple yaml.

Re:Ask HN: What's the worst piece of software you use everyday? by etaioinshrdlu on Saturday July 11, 2020 @02:22PM (#23804380)
You'd still be able to compose a bunch of containers together, but it would result in a new, single container due to nesting.

It could even be compatible with docker-compose and it's yaml.

Re:Ask HN: What's the worst piece of software you use everyday? by mceachen on Saturday July 11, 2020 @03:03PM (#23804792)
I enjoyed docker compose as well (enough to use it for PhotoStructure), but was bit by breaking changes even when I had specified a version in my docker-compose.yml.

It meant that a bunch of my beta users suddenly had broken PhotoStructure configurations because their docker-compose implementation had received a minor update. Why require a version to your configuration file and not increment it on breaking changes?

I ended up tearing out the script that helped people create their own docker-compose.yml file, and replaced the installation instructions with an annotated call to `docker run`.

And don't get me started on how janky it is to update existing containers to new images without docker-compose: there seems to only be one third-party tool to assist with this automatically (lighthouse), but is essentially abandoned. I'd love to be wrong about this, please point me to other solutions if they exist!

Re:Ask HN: What's the worst piece of software you use everyday? by BrandoElFollito on Saturday July 11, 2020 @05:29PM (#23806199)
I use watchtower with docker compose and the update is seamless.
Re:Ask HN: What's the worst piece of software you use everyday? by fsociety on Saturday July 11, 2020 @02:25PM (#23804411)
Haven’t used Podman in production but at home it’s a huge improvement over Docker and enjoyable to use
Re:Ask HN: What's the worst piece of software you use everyday? by ypcx on Saturday July 11, 2020 @02:43PM (#23804593)
For me one of the worst were Docker for Desktop on both Mac and Windows, especially when used for local Kubernetes. I fixed this with a project running Kubernetes directly on a local virtual machine(s) and local Docker (without polluting the machine with Docker for Desktop) is a bonus that comes with that[1].

[1] https://github.com/youurayy/hyperctl

Re:Ask HN: What's the worst piece of software you use everyday? by rikroots on Saturday July 11, 2020 @04:54PM (#23805867)
When Docker for Desktop came out, I refused to move from Docker Toolbox. My reasoning was probably illogical but my view was that if you're maintaining a number of projects, each of which runs in their own Docker environment and some of which had duplicate container names, then having the power to start/stop different Docker engines for each just made a lot more sense to me.

I don't miss Docker.

Re:Ask HN: What's the worst piece of software you use everyday? by kuiro5 on Saturday July 11, 2020 @02:41PM (#23804575)
Strongly agree about this. Docker is conceptually on the right track, but it's fundamentally the wrong abstraction.
Re:Ask HN: What's the worst piece of software you use everyday? by still_grokking on Saturday July 11, 2020 @06:17PM (#23806622)
Even I would like to tune in to Docker bashing (in this case one can actually say with confidence: "Hitler was right"[1]) the fundamental architectural problem is on the OS side.

UNIX, and especially Linux, is a monolithic design. Even such an OS is able to separate user processes form each other all system parts run by concept in the form of a "big ball of mud", with "god-like" capabilities available to them by default. Sure, some internal "barriers" have been added, and per process capability dropping has been retrofitted, but this is backwards form the architectural point of view. Cutting things in peaces after the fact is almost always way more complicated and awkward compared to designing things in a modular way form the get go.

This is related as virtualizing a modular OS is almost a no-brainer (conceptually). You just need to start additional instances of the required system servers / modules / whatever-you-call-that-parts. Compared to that virtualizing a monolith is like trying to construct a kind of Ouroboros: It needs to run itself (with an altered, usually constrained view on the 'outside' world) from inside of itself; and it can't just globally drop the "god-like capabilities" its execution context provides—like it would be possible with an external process. It needs to "hide or manipulate things in front of its own eyes" even "it" has the "all seeing eye". Or to put it even more metaphorical: "A God tries to use his divine powers to constrain his omnipotence so he can lie to himself about the things he sees, without himself ever being able to look through this jugglery". Formulated like that the architectural issue is obvious, I guess.

[1] https://www.youtube.com/watch?v=PivpCKEiQOQ , and I just learned it seems he was also a Kubernetes fan. :-)

Re:Ask HN: What's the worst piece of software you use everyday? by neillyons on Saturday July 11, 2020 @07:26PM (#23807115)
I was thinking recently all these layers of abstraction is crazy. I would be simpler to write a Python web server using micro python and deploy to a server farm of esp32 micro controllers.

No idea if this is possible.

Re:Ask HN: What's the worst piece of software you use everyday? by still_grokking on Saturday July 11, 2020 @07:41PM (#23807211)
Psst, don't tell anybody!

Someone will eventually make a fortune on that idea… ;-)

Re:Ask HN: What's the worst piece of software you use everyday? by pbar on Saturday July 11, 2020 @03:42PM (#23805227)
The reality is that containers via `runc` really _are_ just bundles of processes with some sugar to control Linux namespaces. Using another runtime (kata, etc) would get closer to the tighter abstraction you mention, but it would truly be a VM, just a small one.
Re:Ask HN: What's the worst piece of software you use everyday? by nikisweeting on Saturday July 11, 2020 @05:40PM (#23806291)
I like docker-compose so much that I'd use it even if the underlying containerization technology didn't exist. I think it's one of the things they got most right, and I wish there was a bigger ecosystem around managing compose-based projects.
Re:Ask HN: What's the worst piece of software you use everyday? by Rapzid on Saturday July 11, 2020 @08:05PM (#23807362)
I think it could be better but its features became coupled with swarm. That and the primary maintainer was super hostile to feature requests..
Re:Ask HN: What's the worst piece of software you use everyday? by musicale on Saturday July 11, 2020 @07:39PM (#23807193)
Yeah, docker is an anti-pattern in so many ways.

Linux is partially to blame as well, since the container/isolation APIs can be hard to use correctly, and many people have latched on to docker as something that sort of works.

It also seems to me that the failed security and isolation designs, and painful management and administration designs, of every mainstream operating system have been primary factors in pushing us toward VMs and containers in the first place.

Re:Ask HN: What's the worst piece of software you use everyday? by neop1x on Monday July 13, 2020 @06:35PM (#23826372)
You are probably forgetting about dependency hell, reproducible builds and automated testing. Waaaay tooo often some software won't compile because a bad version of the library is installed in the system or an incompatible compiler is used. Or two perl/python apps require different dependency version. All those problems are quickly solved by Docker. There were no better way to solve it, other than packing and versioning everything like in Chrome build process...
Re:Ask HN: What's the worst piece of software you use everyday? by arp242 on Sunday July 12, 2020 @02:18AM (#23809290)
The isolation stuff is a bit arcane and confusing, but also not that hard to figure out or implement as a wrapper.

I think the biggest reason people like Docker is that Docker makes it so easy to distribute containers.

Re:Ask HN: What's the worst piece of software you use everyday? by the8472 on Saturday July 11, 2020 @05:52PM (#23806406)
> It should not require root at all (no setuid either).

The only thing that really needs setuid are network namespaces to setup the bridges. Userspace workarounds are clunky and slow. If you can do without network isolation then this would be possible.

> The containers should be nest-able to arbitrary depth without performance loss (at least to say, hundreds of nestings deep.)

Multiple levels of nesting are ppossible if you disable seccomp. I don't know if it scales to hundreds though. Overlayfs has hard limits and btrfs snapeshots don't scale infinitely either.

> Also, it wouldn't really be a product at all but just a built-in tool on Linux systems.

Well, there's systemd-nspawn and machinectl

Re:Ask HN: What's the worst piece of software you use everyday? by _-___________-_ on Saturday July 11, 2020 @10:40PM (#23808282)
> > Also, it wouldn't really be a product at all but just a built-in tool on Linux systems.

> Well, there's systemd-nspawn and machinectl

There's also podman, which is a drop-in replacement for docker, and buildah, which does daemonless container builds. I switched to them from Docker recently and will never look back.

Re:Ask HN: What's the worst piece of software you use everyday? by regularfry on Saturday July 11, 2020 @05:20PM (#23806117)
I was thinking through how you might do this, and my brain dredged up User-Mode Linux. A UML wrapper around those docker containers would behave almost exactly like you describe. You should (if I remember correctly) be able to nest them, too.

I'm pretty sure this is doable today. It's a monstrous hack, and I've got no idea what the performance overheads would look like, but as a way of hiding a mess behind a clean facade, I'm not aware of any reason it shouldn't work.

Re:Ask HN: What's the worst piece of software you use everyday? by etaioinshrdlu on Saturday July 11, 2020 @11:16PM (#23808512)
Nowadays, it seems like gVisor is doing something fairly similar to UML but a good deal more lightweight.
Re:Ask HN: What's the worst piece of software you use everyday? by regularfry on Monday July 13, 2020 @08:54AM (#23820226)
Yeah, it looks like this is in the category of "things that could reasonably be done with some elbow-grease" rather than "things that are made impossible by some aspect of the technology".
Re:Ask HN: What's the worst piece of software you use everyday? by ForHackernews on Saturday July 11, 2020 @05:28PM (#23806193)
You might want to check out Flockport: https://thenewstack.io/flockport-time-to-start-all-over-agai...

They're trying to use built-in Linux LXC container features.

Re:Ask HN: What's the worst piece of software you use everyday? by hinkley on Saturday July 11, 2020 @04:19PM (#23805551)
I feel like the Dockerfile format was very tight and simple to use, and the tools somewhat usable, but over time they keep bolting things onto it by committee. It is better than git, but that's pretty faint praise.

When I'm staring at the worst of it (unsticking myself or worse, trying to explain why it's like this to a coworker who is stuck), I keep thinking that there's a standard for making these containers, won't someone get around to rewriting the user-facing bits with the modern requirements designed in from the start?

But it's good enough, so we are probably stuck with it until someone comes up with a better idea to base application compartmentalization upon. Like an OS that actually does what I was promised 25 years ago and am still waiting for.

Re:Ask HN: What's the worst piece of software you use everyday? by m463 on Saturday July 11, 2020 @10:12PM (#23808118)
I think the idea of a docker file is brilliant.

But one pattern I see all the time is:

  RUN foo && bar && bletch && ...
They should have a way of achieving the same thing (just one layer) without multiple commands and added to the same line
Re:Ask HN: What's the worst piece of software you use everyday? by heliosfire on Saturday July 11, 2020 @02:35PM (#23804503)
Some good stuff here, however... Strong disagree on compose. I think it’s amazing.
Re:Ask HN: What's the worst piece of software you use everyday? by _-___________-_ on Saturday July 11, 2020 @10:42PM (#23808292)
I find people only love compose if it's the first exposure they had to container orchestration. Orchestration is a great concept but basically everything else that solves this problem solves it much better than docker-compose.
Re:Ask HN: What's the worst piece of software you use everyday? by lifty on Sunday July 12, 2020 @05:29AM (#23810116)
Can you mention what are the tools that you use as alternatives to compose?
Re:Ask HN: What's the worst piece of software you use everyday? by thrwaway69 on Saturday July 11, 2020 @07:38PM (#23807187)
Re:Ask HN: What's the worst piece of software you use everyday? by AsyncAwait on Saturday July 11, 2020 @04:55PM (#23805876)
I agree except for compose. I actually like compose and how simple it is, but am curious about container nesting. Could you elaborate? How would dependencies work there for example?
Re:Ask HN: What's the worst piece of software you use everyday? by alhirzel on Saturday July 11, 2020 @03:05PM (#23804812)
Give Singularity a look
Re:Ask HN: What's the worst piece of software you use everyday? by walleeee on Saturday July 11, 2020 @05:57PM (#23806448)
Yep. Doesn't have a daemon or require root.