This repository contains a Dockerfile, which creates a container to help demo wasi-http across Spin, NGINX Unit, and Wastime.
To build the container:
docker build -t wasi-http-demo:latest .
- Build the container:
docker build -t wasi-http-demo:latest .
- To run the container:
docker run --rm --name wasi-http -it -p 3000:3000 wasi-http-demo:latest
Note: Any process inside the container should bind to the
0.0.0.0
ip-address.127.0.0.1
will not work. - Run the component using any of the below
- Wasmtime
wasmtime serve ./spin-rust/target/wasm32-wasi/release/spin_rust.wasm --addr 0.0.0.0:3000
- Spin
spin up -f ./spin-rust/spin.toml --listen 0.0.0.0:3000
- NGINX Unit
unitd --no-daemon
- Wasmtime
All the tools you need:
- Spin 2.0
- Wastime 14
- Rust Dev tools
- WebAssembly component tooling