News for hackers. Stuff that matters.
Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @08:12AM (#34080263)
This sounds incredible, as if the co-founder of Docker fails to understand the crucial value proposition of Docker (hence Docker's financial troubles, maybe).

The point of Docker is the ability to take the existing Rube-Goldberg-machine configurations of software, in any and many languages (including the gluing bash scripts), and put it basically unchanged into a controlled, isolated, replicated, shippable environment, with zero performance penalty.

It's very unlike WASM / WASI approach which requires recompiling stuff, non-runs native code, and completely changes the environment in which the code has to run. It's also like 2x as slow, compared to native code. It has its important upsides, but they are very unlike Docker's, in my eyes.

Re:WebAssembly: Docker Without Containers by ClumsyPilot on Wednesday December 21, 2022 @08:32AM (#34080476)
Except there is no secure docker runtime, and there never will be. If you want secure, you have tp put it in a VM , which gives you a performance penalty again.

Secure means you can run arbitrary untrusted code, and webassembly cam do that, and docker can't.

Re:WebAssembly: Docker Without Containers by cmeacham98 on Wednesday December 21, 2022 @08:44AM (#34080615)
There are serious attempts at secure container runtimes (see gVisor) and runtimes that run container images in a real VM (see Firecracker).

This meme that containers are inherently insecure just because Docker doesn't attempt to be a security product needs to die. Docker hasn't been the only player in the container runtime space for a long time.

Re:WebAssembly: Docker Without Containers by Thaxll on Wednesday December 21, 2022 @08:48AM (#34080676)
Insecure is a very strong word, world has been running on Docker for sometime and it works fine and is not as insecure has you seem to think.
Re:WebAssembly: Docker Without Containers by cmeacham98 on Wednesday December 21, 2022 @08:56AM (#34080773)
I agree that Docker actually has a relatively good track record, but it is true that Docker will never be on the same level as a VM hypervisor that was designed from the ground up to be a security barrier.

Thus, when people bring up "Docker is insecure" I try not to get down in the weeds arguing about the specifics, and instead point out alternative projects that are designed with security in mind. I find it's a much stronger counterargument.

Re:WebAssembly: Docker Without Containers by ClumsyPilot on Wednesday December 21, 2022 @10:11AM (#34081653)
The world does not rely on docker for security at all, cloud providers put each tenant of container runtimes behind an additional barrier, like a VM.

Secure runtimes are a superior solution to virtualisation and separate kernels. There are only two secure runtimes in common use - for javascriot and webassembly.

The point about hardware support is very unfair - if you invest the same level of effort and hardware support into webassembly, you can also i prove its performance. Thats like compaining that electric cars suck because there are no chargers - its just infra.

Re:WebAssembly: Docker Without Containers by erk__ on Wednesday December 21, 2022 @12:21PM (#34083497)
I think that security has always been a goal of FreeBSD jails and I believe they are a bit more hardened than docker
Re:WebAssembly: Docker Without Containers by vermaden on Wednesday December 21, 2022 @03:52PM (#34086229)
Docker only uses namespaces and cgoups.

Docker does not provide and security or isolation.

To have security and isolation with Docker you must use something external like SELinux or AppArmor.

Hope that helps.

Regards.

Re:WebAssembly: Docker Without Containers by xvector on Wednesday December 21, 2022 @04:12PM (#34086460)
Docker also uses seccomp.
Re:WebAssembly: Docker Without Containers by rapidlua on Wednesday December 21, 2022 @05:28PM (#34087256)
> Docker only uses namespaces and cgroups.

How is that not isolation?

Re:WebAssembly: Docker Without Containers by kaba0 on Thursday December 22, 2022 @04:16AM (#34091358)
The docker daemon has basically root over your system, so any escape can end very badly.
Re:WebAssembly: Docker Without Containers by groestl on Wednesday December 21, 2022 @08:46AM (#34080644)
Didn't say secure though, just isolated. Often I'm fine with some subset of isolation.
Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @09:01AM (#34080815)
Oh shucks. Docker's value proposition is emphatically not security. If you want really good insulation, run a proper VM.

Docker's value proposition is convenient. reproducible, self-contained packaging of software. It's the ability to deploy pieces of existing, battle-tested, gnarly and imperfect software next to each other, and care not about their conflicting or missing dependencies. It's more like Flatpak or AppImage, only more popular and easy.

This packaging also includes a kind of network insulation, exposing only the desired ports, making it easy to have VLANs between containers that do not interfere, etc. This is, again, not a serious security mechanism, but more of a convenience, but a very valuable convenience.

Re:WebAssembly: Docker Without Containers by mkher8 on Wednesday December 21, 2022 @10:07AM (#34081595)
> Oh shucks. Docker's value proposition is emphatically not security.

Congratulations, you have just discovered the additional value that WASM will bring to the Docker approach.

Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @10:19AM (#34081753)
WASM is the "run a proper VM" approach mentioned in the first line.

WASM is great, but it solves a different problem.

Re:WebAssembly: Docker Without Containers by pxc on Wednesday December 21, 2022 @11:19AM (#34082650)
> Docker's value proposition is convenient, reproducible, self-contained packaging of software.

Docker doesn't solve any packaging problems, though. It just piggybacks off of other package management solutions and allows ad-hoc, unmanaged modifications to OS images (the convenience) and contains that result for easy distribution.

But nothing in that process ensures reproducibility— the package managers wrapped in Dockerfiles are typically non-deterministic: what any set of commands for them will do depends on the state of the internet at the time they run. Similarly, composing Docker layers is not like composing packages: reuse of packaged objects is minimal rather than maximal, granularity is course, dependency management details may vary from container to container (as they may be based on different Linux distros or language-specific package management ecosystems), and it's very easy to end up with software and configuration installed with which there is no associated package management metadata.

Docker doesn't know anything about packages. Container scanning tools that do things like produce a bill of materials or scan for known vulnerabilities inside Docker containers simply have to guess at what distro is installed inside the container and then reconstruct that information in a distro-specific way to the best of their ability! Docker doesn't solve package management issues so much as punt on them (which is, of course, convenient, because package management is hard).

> [Docker is] more like Flatpak [...] only more popular and easy.

I don't think this is a sound comparison, either. Flatpak is a desktop-oriented containerization solution, for packaging graphical software that will predictably need to interact with the local filesystem, GPU, sound, and other resources. It's also a solution that tackles security updates and deduplication in a serious (and effective) way involving some discipline and enriching shared runtimes with actual metadata rather than just composing filesystem layers together.

It may indeed be easier to crap out something which will be considered a valid Docker image than it is to crap out something which will be considered a valid Flatpak application, but that does not make Docker easier. It's not easier for a desktop user to keep a collection of 50 Docker containers patched for security fixes than it is for a desktop user to keep a collection of Flatpak applications patched for security fixes. It's not easier to take a random Docker container and plug it into your operating system's native file picker or sound system for use with graphical applications than it is to do so with a random Flatpak application. It's not easier to determine what the heck exactly is actually installed in a Docker container than it is to see what is in a Flatpak container. It is not easier to plug a random Docker application into your operating system's default password manager, and so on, and so on.

Writing Flatpak packages requires actually thinking about things that Docker doesn't because Flatpak actually solves package management issues (and other things) that Docker doesn't.

Re:WebAssembly: Docker Without Containers by pxc on Wednesday December 21, 2022 @04:17PM (#34086520)
Downvotes without replies is always disappointing.

I would be curious to hear what is wrong in my comment above from anyone who has actually worked on general purpose packaging (e.g., written a package to be included in or overlaid onto a ports tree, maintained RPMs built from RPM spec files, run their own Ubuntu PPA, etc.), implemented tools that scan containers (e.g., SCA scanning or SBOM generation tools), or done reproducibility research.

Would someone with an awareness of full-fledged package management solutions based on or built with containers (e.g., Luet, Distri, Flatpak) really argue that having fine-grained abstractions for reasoning about dependencies or shared runtimes, performing security updates, etc., makes no difference as to what kind of software we're talking about and what problems it solves?

To me it seems obvious that

  - not all software distribution mechanisms are package management solutions
  - Docker cannot see or reckon with individual packages
  - the Docker ecosystem relies on rather than replaces package managers, build systems, etc.
and so on. Are there serious arguments to be had here about those things, or do people just feel like my earlier comment was somehow unkind to Docker?
Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @08:19PM (#34088545)
Docker containers solve the packaging-for-deployment problems that a ton of people used to have. Were they not solving it, they won't be so predominant.

Docker does handle deduplication on a certain level: every layer is only built once, and shared among all images that use it. This can be strategically used to seriously reduce the summary size of your containers.

Desktop users are not the target audience of Docker, except if you consider running a sham prod configuration on your dev machine desktop use. Containers are intended for the server side, and they are fine there.

Not sharing too much, and plainly embracing the existing chaotic practices of software creation and containing them, so that they don't interfere with each other, is the core value proposition of Docker containers. They do not require you to change your existing key practices at a lower level; your Babel / CMake / pyenv / whatnot setup can remain. But it changes the deployment story of it.

Re:WebAssembly: Docker Without Containers by ptx on Wednesday December 21, 2022 @11:33AM (#34082846)
> Docker's value proposition is emphatically not security [...] It's the ability to deploy [...] gnarly and imperfect software

This sounds like a recipe for disaster to me and is why I haven't gotten into Docker.

If the software being deployed is too complicated to build and install without Docker, but Docker doesn't provide secure isolation, how can you be sure that this "gnarly and imperfect" mess of a system is secure?

Re:WebAssembly: Docker Without Containers by xvector on Wednesday December 21, 2022 @11:58AM (#34083190)
Docker isn’t billed as a security solution but that doesn’t mean that it doesn’t come with some good defaults. You get some namespace/cgroup/seccomp/etc defaults OOTB which is still probably an improvement over what the organization currently has.
Re:WebAssembly: Docker Without Containers by greiskul on Wednesday December 21, 2022 @12:09PM (#34083353)
It's not about the software being complicated to install without Docker. It's about Docker making the installation process uniform no matter the software.
Re:WebAssembly: Docker Without Containers by cstrahan on Wednesday December 21, 2022 @01:22PM (#34084360)
I think you're missing the GP's point.

What docker provides is a way to shrink-wrap a given build and all of its runtime dependencies.

Despite popular misconception, what docker does not give you is a deterministic way to build that software. A Dockerfile provides the RUN steps necessary to build the software, but dependencies must still be fetched over the network, introducing non-determinism.

You can spend 6 months happily using the latest release of some image, only to find that there's a critical bug or vulnerability that needs addressing ASAP. It kind of sucks for that complacency to turn to terror when you try to patch the software and rebuild, only to find inscrutable errors due to an absolutely bonkers build system.

"ERR: Version A of Foo is incompatible with version B of Bar"

Okay... but what happened here? What versions were we pulling before? Oh, the precise version isn't pinned in the build system, so.. I dunno. Great. It would really help if I knew if it was A that updated breaking B, or the reverse.

Then multiply that by 1000x.

And then add in (for Debian-esque base images) Apt repositories disappearing over time, git feature branches being deleted, tarballs falling off the edge of the internet, etc.

Now, before someone says "well, that's on you if your Dockerfile obscures so much build non-determinism!"

I agree with that statement! But that is a non sequitur with respect to the original premise: the build systems (and the web of dependencies they pull in) in third-party software you don't have ownership of is getting crazier and crazier, and Docker helps perpetuate this state of affairs, and the industry suffers as a whole.

Re:WebAssembly: Docker Without Containers by pnt12 on Wednesday December 21, 2022 @07:24PM (#34088186)
> Despite popular misconception, what docker does not give you is a deterministic way to build that software.

I read an interesting thought: reproducibility is a spectrum. Docker isn't as reproducible as nix, but when used with version control and ci/cd, is damn more reproducible than zips with code and ftping them to servers.

Re:WebAssembly: Docker Without Containers by Sohcahtoa82 on Wednesday December 21, 2022 @01:02PM (#34084097)
> how can you be sure that this "gnarly and imperfect" mess of a system is secure?

You can't.

But it's not like escaping a container is going to happen because of a simple bug. You need an exploitable vulnerability in the containerized app that creates a path to escaping the container.

But yeah, if you want to isolate an app for security reasons, then you need a VM.

Re:WebAssembly: Docker Without Containers by ptx on Wednesday December 21, 2022 @03:06PM (#34085711)
Right, but if Docker allows us to package much more complicated applications (as opposed to being forced to simplify) that gives the bugs more room to hide and increases the risk of unforeseen interactions resulting in security bugs in the application.

So what I'm trying to say is that making complicated applications easier to deploy doesn't seem like a win unless you also mitigate the increased security risk that comes with more complicated applications.

Re:WebAssembly: Docker Without Containers by cube2222 on Wednesday December 21, 2022 @09:20AM (#34081026)
Isn't gVisor a secure docker runtime?

Sure, it doesn't reuse the kernel, but it's not a VM either.

Re:WebAssembly: Docker Without Containers by jakogut on Wednesday December 21, 2022 @09:52AM (#34081419)
> you have tp put it in a VM , which gives you a performance penalty

This claim is dubious for many configurations of hardware accelerated virtualization. The hardware creates another ring 0 for each guest kernel, and guests run at the same level as the host. It's true that layering things like filesystems and networking incur overhead, but it's just as easy to pass through a physical disk, and bridge virtual TAP interfaces to physical NICs.

Hardware virtualization is very flexible, and there's a configuration out there that will meet the performance requirements of the vast majority of projects.

Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @11:19AM (#34082642)
A native code VM gives really little performance penalty.

Consider VMs like those which run Javascript, or WASM. JIT compilation can get pretty close to C performance, as JVM and LuaJIT show though, given enough RAM at runtime, and money for development.

Re:WebAssembly: Docker Without Containers by yjftsjthsd-h on Wednesday December 21, 2022 @12:44PM (#34083858)
runq exists, and gvisor can be used as a docker runtime, so yes docker absolutely can.
Re:WebAssembly: Docker Without Containers by drdaeman on Wednesday December 21, 2022 @12:47PM (#34083917)
How many folks out there need to run arbitrary untrusted code on their systems? I think most of the time, the code they run is either their own or from a trusted third party.

And for those use cases, where secure containment of running applications is not a goal at all (beyond maybe taking some basic precautions), I fail to see any value to recompile it to WASM, CLR, JVM, Z80 bytecode or whatever else.

Those who need isolation - yeah, WASM could be a very solid alternative to having a VM. But it's a pretty niche use case.

Re:WebAssembly: Docker Without Containers by talkingtab on Wednesday December 21, 2022 @09:20AM (#34081029)
Good point.

I just wonder how many founders and co-founder fail to understand the crucial value proposition of their business. I suspect one attribute of successful start ups is that over time they come to understand that aspect. And perhaps when we hear of startups "pivoting" that is not the result of a though process but instead a forehead slapping "why didn't I see that?" moment.

Re:WebAssembly: Docker Without Containers by ridruejo on Wednesday December 21, 2022 @10:14AM (#34081700)
Solomon is no longer at Docker (hasn’t been for a while) and Docker Inc is doing extremely well financially after the split and renewed focus on developers. This Wasm release also shows they are very forward looking… I am very positive on the company and what they are doing (no affiliation other than like Scott and the team over there)
Re:WebAssembly: Docker Without Containers by mdeeks on Wednesday December 21, 2022 @12:59PM (#34084059)
Genuine question: How much of that financial improvement is due to them requiring companies to now pay for Docker Desktop on macOS? We found ourselves essentially with no option but to pay up for a full year on short notice. We want nothing of their other paid offerings like builds or repo hosting. The sales rep basically confirmed we're just paying for the thing we used to get for free now. The whole call was a giant "FU, too bad". Left an extremely bad taste in our mouths. Obviously we're going to focus heavily on dumping Docker Desktop as fast as possible in the next quarters.
Re:WebAssembly: Docker Without Containers by ahtihn on Wednesday December 21, 2022 @03:13PM (#34085794)
> Obviously we're going to focus heavily on dumping Docker Desktop as fast as possible in the next quarters.

If you need to invest significant effort into dumping it, it's almost certainly cheaper to just pay for it. Especially so if the alternative makes any sort of compromise on developer experience.

Re:WebAssembly: Docker Without Containers by pantry-man on Wednesday December 21, 2022 @03:25PM (#34085945)
My workplace is also working on dumping docker desktop. Their website says it's $24 per month per user if you have over 100 users. We have around 2000 engineers, so it's half a million dollars a year for something that used to be free.

If it takes two engineers half a year to get a replacement working you're already back in black, and honestly I'm not even sure why (in our specific case) it would take that long when there already are free alternatives.

Re:WebAssembly: Docker Without Containers by mdeeks on Wednesday December 21, 2022 @08:07PM (#34088465)
In our case we have multiple tools that wrap docker and at first try none of them worked with podman. Podman doesn't actually have an API socket you can interact with. There is something called podman-helper but for the life of me I could not get it to work reliably. Also the API responses were not formatted the same way so now our code has to detect and fork logic if it is podman

And this is only the first example I saw. Now we have to root out all apps everywhere across the company that might integrate this tightly with docker.

Then there are performance considerations. Docker Inc apparently did quite a bit to improve performance, especially disk perf. We need to verify all of our existing workflows still work reliably.

None of this is hard, it just takes time and effort.

Re:WebAssembly: Docker Without Containers by ridruejo on Wednesday December 21, 2022 @03:44PM (#34086161)
Yes, there is not a clear, free alternative. The license kicks in at 10MM in revenue, at that point there are certain things that are easier to pay than try to replace (Slack, Google Apps… ). Everyone has to make their own decision of where they focus their attention/money, in my case I have authorized for every one of my reports that has needed it and just moved on …
Re:WebAssembly: Docker Without Containers by holografix on Wednesday December 21, 2022 @03:49PM (#34086216)
Genuine question: do you think people creating software that’s incredibly valuable for you should’t get paid?

You had it for free for a long time? Lucky you!

Re:WebAssembly: Docker Without Containers by cogman10 on Wednesday December 21, 2022 @04:11PM (#34086451)
I don't think anyone has a problem with that.

The problem is really more one of "we operated so long without paying and now, blam, everyone pays next year".

It'd be sort of like if github deciding "You know what, everyone now needs to pay $7 a month/user for github". Perfectly within their right, but also a little bit of whiplash for a large number of people.

The next question is if this will last. There's already competitors to docker (rancher/podman/various k8s on my box things).

Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @05:26PM (#34087227)
Exactly! They decided that you would rather pay than migrate off it, so they can start charging, and stop leaving substantial money on the table.

It seems that their assumptions were correct.

Re:WebAssembly: Docker Without Containers by mdeeks on Wednesday December 21, 2022 @08:01PM (#34088421)
It feels like a bait and switch. They got us hooked on a free product and then slapped us with a bill and only short time to change all of our software to not use it if we didn't want to. Also the pricing jumped up the longer you waited to sign. So we had little time to evaluate Rancher and others.

I do agree it is a product that is potentially worth paying for. I do NOT think that the product is worth the amount we were suddenly forced to pay. It felt like extortion.

Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @05:24PM (#34087204)
Last time I checked, it was completely possible to install Virtualbox and normal Docker CLI on a Mac, and everything worked well (for me), without Docker Desktop at all.

But that last time was on Intel Macs; maybe the situation is completely different on ARM.

Re:WebAssembly: Docker Without Containers by mdeeks on Wednesday December 21, 2022 @07:53PM (#34088369)
It doesn't work on M1 last I checked. And anyway even if they updated Virtualbox for ARM, Oracle is predatory and sends nasty emails about paying up if they detect anyone in your company uses it.
Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @08:11PM (#34088494)
I remember that the open-source Virtualbox part is free from any nagware. The closed-source parts are those needed for desktop integration (good screen, clipboard, file sharing, etc), but they are not needed for running a Linux VM with Docker (or some other container runtime BTW).
Re:WebAssembly: Docker Without Containers by acdha on Wednesday December 21, 2022 @08:18PM (#34088533)
I’m mixed on this because I generally like paying for tools but this was too fast (institutional budget year pain) and Docker Mac was characterized by long-running unfixed bugs like high CPU usage. I think they really screwed up their business model and are burning through goodwill trying to recover but I wish they’d tried working with the community.

I mostly use the CLI so I have Podman a try and it took less than a single lunch to completely replace Docker for me. Performance is excellent for ARM, and acceptable for the x86 containers I infrequently use.

https://gist.github.com/acdha/9be1c3521af4f18d9f86264a889581...

Re:WebAssembly: Docker Without Containers by solomatov on Wednesday December 21, 2022 @10:23AM (#34081814)
> It's also like 2x as slow,

Do you have links to recent benchmarks? My understanding is that there were investment in bridging the gap recently.

Re:WebAssembly: Docker Without Containers by nine_k on Wednesday December 21, 2022 @11:08AM (#34082492)
I looked at stuff like https://programming-language-benchmarks.vercel.app/wasm-vs-r...

(Comparisons with small input sizes are not informative; look at larger runs.)

Re:WebAssembly: Docker Without Containers by solomatov on Wednesday December 21, 2022 @12:03PM (#34083264)
Thanks a lot. The difference is huge unfortunately :(
Re:WebAssembly: Docker Without Containers by buu700 on Wednesday December 21, 2022 @01:38PM (#34084545)
This is what initially confused me about comparisons between Docker and wasm, as someone who's long been a fan of both.

As far as I know, wasm won't let me apt-get install a bunch of stuff, set up cron jobs, glue together miscellaneous bash scripts, and magically run it without containers or VMs on any host architecture. That's the use case I'm most familiar with for Docker; wasm as I knew it was just a neat way to run untrusted native code on arbitrary machines with reasonable performance and security.

I think the disconnect is that Docker is also used as essentially a glorified package manager (sort of like Snap), combined with a runtime/interface that makes it convenient for devops purposes. From that perspective, I suppose there's not much difference between running a standalone binary inside its own dedicated Linux environment, and compiling it to wasm to run directly on the host OS, so long as the API remains unchanged.

It's just needlessly confusing to go as far as to call wasm a wholesale replacement for Docker. It's like saying Java is an alternative to Windows.

Re:WebAssembly: Docker Without Containers by xvector on Wednesday December 21, 2022 @04:10PM (#34086440)
It’s absolutely wild to me that Solomon so fundamentally misunderstands the appeal of Docker.
Re:WebAssembly: Docker Without Containers by jcelerier on Wednesday December 21, 2022 @04:14PM (#34086478)
for me the only use of docker is "quickly reproduce whatever $LINUX_DISTRO my users run and make sure that my stuff builds & run on it without having to install a complete VM in virtualbox" ; I also don't really understand how WASM would help with this in any way
Re:WebAssembly: Docker Without Containers by enos_feedler on Wednesday December 21, 2022 @02:26PM (#34085223)
the crucial value proposition of Docker was to show megacap cloud providers that containers are a thing for developers and to build them first class into their cloud platforms -> kubernetes. I went to a GCP conference shortly after Docker went big and everyone was talking about it. It was no surprise that Google mentioned the word "container" 100s of times throughout the full day conference and never mentioned the name Docker once.
Re:WebAssembly: Docker Without Containers by kaba0 on Thursday December 22, 2022 @03:52AM (#34091222)
> The point of Docker is the ability to take the existing Rube-Goldberg-machine configurations of software, in any and many languages

Well, Docker is not good at this, your Dockerimage can be as non-reproducible as it gets, it just pushes the problem to a different level. Nix and other package managers are the actual solution to this issue.