Show and tell: .NET 8 + WASM/WASI Dockerfile #5895
lbussell
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Docker Desktop recently added beta support for Wasm workloads. Given that .NET supports the
wasi-wasm
RID, I hacked together a sample project and Dockerfile for running .NET apps using Docker Desktop's WASM runtime.The sample is inspired by the final demo in @shanselman's recent talk at NDC Sydney (.NET and Containers - each layer of abstraction indistinguishable from magic). I improved his sample by encapsulating the build entirely within the Dockerfile instead of building the app locally and copying the
.wasm
bundle into the container. I also used our standard dotnetapp sample'sProgram.cs
which provides some additional text output.Full source: https://github.com/lbussell/dotnet-docker-wasi/
Dockerfile:
Beta Was this translation helpful? Give feedback.
All reactions