Closed EderLukas closed 1 year ago
Hi!
Please set
export BUILDX_NO_DEFAULT_ATTESTATIONS=1
To avoid the no match for platform in manifest
. The upstream issue is https://github.com/moby/buildkit/issues/3891.
For the failed to create container: unknown
, please change your Dockerfile to
FROM scratch
COPY --chmod=755 helloworld.wasm /helloworld.wasm
ENTRYPOINT [ "/helloworld.wasm" ]
i.e., make sure the wasm file is executable (with --chmod=755
) and use an absolute path for the entrypoint (by prefixing it with /
). The upstream issue is https://github.com/containerd/runwasi/issues/278.
I hope that helps
Thank you, sir! This did the Trick.
Description
I tried to run a "Hello World" in C, compiled with emscripten, put into a docker image but I get the error: docker: Error response from daemon: failed to create container: unknown.
I enabled WASM through docker desktop, I installed the wasm runtimes when asked.
Docker File
C Code
Batch File to automate the deploy
I had to use provenance command otherwise I would get an error when building the image.
Reproduce
docker buildx build --platform wasi/wasm32 --provenance=false -t wasm/hello-world . docker run --rm --runtime=io.containerd.wasmedge.v1 --platform wasi/wasm wasm/hello-world:latest
Expected behavior
I assumed it would print Hello World in the command line.
docker version
docker info
Diagnostics ID
43CFDCA6-2BE4-4D54-A1CA-8ADF0DB8238C/20230826205355
Additional Info
No response