Stream: wasmtime

Topic: ✔ platform wasi/wasm not working for native docker


view this post on Zulip Sangeeta Kakati (Aug 03 2024 at 17:54):

I am trying to run a Docker container on the wasi/wasm platform using both a Jetson Nano and an AWS server. My setup includes containerd, and I am using the wasmtime shim, which I have built and integrated with containerd. The setup is similar on both my Jetson Nano and AWS server, though the AWS server is running containerd as part of k3s.
What Works:
I can run the docker containers on the host architecture (Linux ARM64 on Jetson Nano, and x86_64 on AWS) using the wasmtime runtime without issues.
But when I attempt to run the docker container on the wasi/wasm platform, I receive the following error:
docker: operating system is not supported.

view this post on Zulip Ramon Klass (Aug 03 2024 at 20:57):

I think you got something confused. Wasi in OCI does not mean you can run any Docker image on the wasm virtual machine, it means you can deploy wasi components similar to docker containers, but it only runs very specific wasi components, not any docker image

view this post on Zulip Ralph (Aug 05 2024 at 10:02):

when you say I am using the wasmtime shim -- do you mean https://github.com/containerd/runwasi based shim? Runwasi does run both docker images and wasm images, but it does so by switching the inner implementation. You can't tell wasmtime to run docker images; you also cannot tell containerd's runc shim to run wasm images.

Facilitates running Wasm / WASI workloads managed by containerd - containerd/runwasi

view this post on Zulip Sangeeta Kakati (Aug 05 2024 at 11:31):

Yes, I meant the  https://github.com/containerd/runwasi based shim, and I compiled and pushed it using buildx and --platform wasi/wasm, I could run it in my machine(with docker desktop) but when I try to do the same thing on my server with native docker, it doesn't work.

This is how I run it locally:

docker buildx build --platform wasi/wasm --tag sangeetakakati/rust-matrix-wasm:wasm --output "type=image,push=true" --builder default .

docker run --runtime=io.containerd.wasmtime.v1 --platform=wasi/wasm sangeetakakati/rust-matrix-wasm:wasm

Facilitates running Wasm / WASI workloads managed by containerd - containerd/runwasi

view this post on Zulip Ralph (Aug 05 2024 at 12:35):

when you say "native docker" do you mean the docker desktop or do you mean with moby, the "dockero-ce" version?

view this post on Zulip Ralph (Aug 05 2024 at 12:35):

because they support slightly different things.

view this post on Zulip Sangeeta Kakati (Aug 05 2024 at 12:39):

Yes the ce.. I am using version 27.1.1

view this post on Zulip Ralph (Aug 05 2024 at 12:39):

you should jump into the runwasi slack channel and post this issue there

view this post on Zulip Ralph (Aug 05 2024 at 12:40):

if @Mossaka (Joe) or @James Sturtevant are around, they might know but that's the place for this question! in that channel you can ask the docker people as well. They'll repro for you much, much faster.

view this post on Zulip Ralph (Aug 05 2024 at 12:41):

it's in the CNCF slack org

view this post on Zulip Notification Bot (Sep 09 2024 at 12:18):

Till Schneidereit has marked this topic as resolved.


Last updated: Dec 23 2024 at 14:03 UTC