WebAssembly Docker Container
Content: Theory: Why? | Theory: How? | Docker Desktop Setup | Docker Build | Docker Run | Docker Compose | Performance | Further Resources
Why?
The famous quote from one of the inventors of Docker, Solomon Hykes: “If WASM+WASI existed in 2008, we wouldn’t have needed to created Docker.”
There is a follow-up tweet in which Solomon talks about Docker not disappearing as a result. Instead, Windows, Linux, and WebAssembly containers will be used together and side by side with Docker.
Classic Docker containers or their contents are compiled for a specific target architecture (arm, x86, etc.) and include various operating system components.
Now, when a WebAssembly runtime is available, these points can be handed over to the runtime. As a result, you get a container with the following additional advantages:
- Includes only application code, leading to smaller (memory) and more secure (attack surface) containers with faster startup times.
- Compatibility across different architectures and operating systems.