News for hackers. Stuff that matters.
Re:WebAssembly: Docker Without Containers by maxloh on Wednesday December 21, 2022 @08:03AM (#34080172)
There are some other aspects that docker cannot be replaced.

For example, making sure build works accross different platforms and machines. There are too many ways that something may break, incorrect SDK versions, missing dependencies etc. Docker makes sure the OS (container) to be setup correctly to handle the build.

Re:WebAssembly: Docker Without Containers by chriswarbo on Wednesday December 21, 2022 @08:16AM (#34080302)
> For example, making sure build works accross different platforms and machines

Unfortunately Docker only works on Linux, since it's tied to specific syscalls. Those on other platforms (e.g. macOS) can only run it in a VM (e.g. the Docker Desktop application is built on top of a VM running Linux)

> here are too many ways that something may break, incorrect SDK versions, missing dependencies etc.

AFAIK Docker doesn't actually address that. It provides a "Dockerfile", which is essentially just a shell script; users still have to manage dependencies themselves, e.g. by having their Dockerfile invoke an actual package manager.

> Docker makes sure the OS (container) to be setup correctly to handle the build.

Containers aren't operating systems; they only need the desired executable, plus its run-time dependencies (e.g. libc).

Re:WebAssembly: Docker Without Containers by my123 on Wednesday December 21, 2022 @10:59AM (#34082371)
> Unfortunately Docker only works on Linux

And Windows. On Windows, Docker can actually create and manage Windows containers in addition to Linux ones.

macOS just doesn't have the namespacing primitives for such a scenario as far as I'm aware.

Re:WebAssembly: Docker Without Containers by klabb3 on Wednesday December 21, 2022 @06:46PM (#34087913)
> Docker can actually create and manage Windows containers in addition to Linux ones.

The reason why I’m bullish on WASM is the hope that there will not be a “Linux container” or a “x86 binary”, but only universal binaries and libraries. Unlike the JVM though, they’ll be sandboxed and don’t impose a GC with 200 tuning parameters. Lastly, there is language interop on an FFI level between any two languages that bind against WASM. In short, it’s an interop dream of mine.

That doesn’t mean I endorse premature shilling of everything WASM. That can do more harm than good.

Re:WebAssembly: Docker Without Containers by my123 on Wednesday December 21, 2022 @07:39PM (#34088279)
WASM performance just isn't there. At scale, evaluating the costs just made me shudder.

For server scenarios, no, this just isn't it.

The JVM does a lot of very useful things that WA does not try to handle. Java is not going anywhere and is still going to need a GC. The WA runtime does _not_ handle memory safety inside of the app at all as of today...

Re:WebAssembly: Docker Without Containers by maxloh on Friday December 23, 2022 @01:56AM (#34102999)
It should be safe to assume that Dockerfile create the same (or really similar) image everytime. So builds should run the same in different machines.
Re:WebAssembly: Docker Without Containers by chriswarbo on Monday December 26, 2022 @08:42AM (#34137556)
> It should be safe to assume that Dockerfile create the same (or really similar) image everytime

Nope. Most of the Dockerfiles I've seen will do wildly-unreproducible things, like running apt/pip/yum/npm/mvn/sbt/etc. without even giving any version numbers (let alone expected hashes)

This seems to be pretty rampant; for example, here's some AWS documentation which encourages such reckless behaviour (even giving the '-y' option to apt-get!): https://docs.aws.amazon.com/AmazonECS/latest/developerguide/...

Re:WebAssembly: Docker Without Containers by sp332 on Wednesday December 21, 2022 @08:10AM (#34080241)
Something like the docker build tools would still be needed, but not the docker runtime.
Re:WebAssembly: Docker Without Containers by maxloh on Friday December 23, 2022 @02:01AM (#34103024)
Maybe Nix[0] is what you want. It is founded for providing a way to produce reproducible builds.

[0]: https://nixos.org/