go-wasmcontainers documentation
go-wasmcontainers runs WASI modules as containers. A container here is a
wasip1/wasm module: the image is an OCI image whose platform is os=wasip1,
arch=wasm, the wctr command line talks to the wctrd daemon over
/var/run/wctr.sock, and the module runs in wazero, a
pure-Go WebAssembly runtime, instead of in a Linux kernel. wctrd serves a
subset of the Docker Engine API.
Engine v0.31.0 is released (v0.31.0:
lineedit, a line editor module of its own that wctr and the guest shell share; v0.30.1: piped stdio is no longer reported as a terminal, and guest exit codes 0 to 255 are kept; v0.30.0): run -i and -t, wctr attach and start -ai (a container’s own stdin and terminal, detach keys, resizes), health checks (run --health-cmd, State.Health, health_status events), restart policies (run --restart), published ports (run -p, wctr port), wctr exec (in the browser executor too, and exec -t follows window resizes), the WASIX process subset (sh,
pipelines, shell-form RUN), networks with aliases and several networks per
container, wctr commit and tag, wctr build and wctr compose built into
wctr, networking (Networking), tar+zstd layers,
named volumes, wctr events and wctr stats, containers that survive a restart,
and shell completion. The playground is live (v0.7.0, on engine v0.30.1, with networking, Join
class, wasi-nn, GPU surfaces, WASIX, a shell image, run -it, -p in a tab and a WebDAV file server, fileshare):
https://go-wasmcontainers.github.io/playground/ runs a dashboard and wctr in
a browser tab, with no server, and works offline. A second origin for containers'
pages, https://go-wasmcontainers-usercontent.github.io/, is deployed, but
-p in the browser is not live yet (the rest of it is in progress): see
Limitations. Everything on the
roadmap under “Planned” is planned. These pages
describe engine v0.31.0.Why
Teaching containers usually means a Linux machine per learner. A WASI module needs no kernel, so the same engine runs natively and in a browser tab — which makes a training lab a web page. The learner types container commands the way they will at work.
Pages
- Playground:
wctrin a browser tab - Dashboard: a graphical dashboard for the engine (v0.8.0)
- Getting started: install, and a real session
- Networking: sockets, DNS by container name and networks
- Build:
wctr buildfrom a Containerfile (build v0.4.0) - Compose: multi-container applications, YAML, JSON or HCL2, with ports, restart policies and health checks (compose v0.6.0)
- Shell: a POSIX shell for WASI containers (shell v0.4.0, coreutils v0.6.0)
- GPU: wasi-nn on the CPU and WebGPU, wasi:webgpu compute, rendering to surfaces and surface input (gpu v0.6.0)
- Commands:
wctr,wctrd, exit codes and limits - Architecture: the engine, its API, the executors, the images
- Performance: what was measured
- Limitations: what the engine does not do
- Relay:
wctr-relay, the classroom relay and firewall (v0.3.1) - Design: design documents for planned parts, such as the classroom network
- Roadmap: what is planned
- FAQ: why
wctr, and notdockerorctr - References: the specifications the code is written against
Repositories
| Repo | Status |
|---|---|
| engine | v0.31.0 released (cmd/wctr v0.3.0; lineedit/v0.1.0) |
| relay | v0.3.1 released |
| build | v0.4.0 released (built into wctr) |
| compose | v0.6.0 released (built into wctr; ports need engine v0.22.0 or later, restart policies v0.25.0, health checks v0.28.0) |
| shell | v0.4.0 released (a line editor on a terminal, now the engine’s shared lineedit; wasix/v0.1.0 with wasix/exec; runs on engine v0.17.0 or later; public base image ghcr.io/go-wasmcontainers/shell:0.3.0, with coreutils v0.6.0) |
| gpu | v0.6.0 released (wasi-nn, wasi:webgpu compute, rendering to surfaces, surface input) |
| playground | v0.7.0 released, live in the browser |
| dashboard | v0.8.0 released (Open shell; surface input for GPU panes); live demo |
| docs | this site |
| go-wasmcontainers.github.io | the landing page |
| brand | logo, icons and social images |
Created on by tannevaled
Modified on by tannevaled