Maybe I'm thinking too much about the implementation, rather than the use cases, but to me, WebAssembly is a VM/execution environment (in the sense of the JVM, not VirtualBox), whereas Docker is a containerization solution (i.e. a way to isolate userspace environments, for both security and dependency management), and decidedly also not a VM at all.
I can see how they can be used for similar goals, in any case: "Run my binary efficiently on your generic computer without having to trust it".
I'm thinking of the end product of the "Docker container", not all of the things it takes to get there. The "my binary" part is what WebContainer emphasizes, and it's somewhat impressive in how many programs it can run.
I agree WASM is more similar to the JVM but I think the JVM is pretty similar to a Docker container in a way, if you get rid of all the higher level JVM features like garbage collection, and for docker container look at the whole system and not just docker. If you have a computer with only docker installed it's easy to think of it as docker when it's really docker or containerd running on the Linux distro. Or some MicroVM orchestration.
In what sense?
Maybe I'm thinking too much about the implementation, rather than the use cases, but to me, WebAssembly is a VM/execution environment (in the sense of the JVM, not VirtualBox), whereas Docker is a containerization solution (i.e. a way to isolate userspace environments, for both security and dependency management), and decidedly also not a VM at all.
I can see how they can be used for similar goals, in any case: "Run my binary efficiently on your generic computer without having to trust it".