Containers revolutionized deployment, but technology never stands still. What might complement — or replace — traditional containers in the years ahead?
1. Containers Today
Containers are the standard unit of cloud deployment. From startups to hyperscalers, OCI containers are everywhere. But they have real limitations:
- Large images — even "slim" images are 50–200 MB; many production images exceed 500 MB
- Slow cold starts — seconds to pull + start, vs milliseconds for serverless functions
- Shared kernel — all containers share the host kernel, creating a security boundary that can be breached
- Linux-only (mostly) — Windows containers exist but the ecosystem is overwhelmingly Linux
- Over-provisioned — containers include entire userland even when the app uses a fraction of it
These limitations have driven innovation in multiple directions simultaneously.
2. WebAssembly (WASM) Containers
WebAssembly started as a portable bytecode format for browsers — a compilation target for C, Rust, Go, and others that runs in a sandboxed VM at near-native speed.
Now it's escaped the browser. WASI (WebAssembly System Interface) provides a standardized way for WASM modules to interact with the outside world — files, network, clocks — without a full OS.
Key Properties
- Tiny binaries — typically 1–5 MB for a complete application
- Microsecond cold start — no OS to boot, no runtime to initialize
- Sandboxed by default — capability-based security; no access unless explicitly granted
- Language-agnostic — compile from Rust, C/C++, Go, Python, JavaScript, and more
- Truly portable — no OS dependency; runs on any platform with a WASM runtime
Docker + WASM
Docker has integrated WASM support directly:
# Run a WASM container with WasmEdge runtime
docker run --runtime=io.containerd.wasmedge.v1 \
--platform=wasi/wasm \
secondstate/rust-example-hello:latest
# Available WASM runtimes in Docker
# io.containerd.wasmedge.v1 — WasmEdge
# io.containerd.wasmtime.v1 — Wasmtime
# io.containerd.spin.v2 — Fermyon Spin
WASM Runtimes
- Wasmtime — Bytecode Alliance reference runtime, production-ready
- WasmEdge — Optimized for cloud-native and edge; supports networking, async I/O
- Spin — Fermyon's framework for building WASM microservices
3. WASM vs Containers
| Property | OCI Containers | WASM Modules |
|---|---|---|
| Image size | 50 MB – 1 GB | 1–5 MB |
| Cold start | 1–10 seconds | <1 millisecond |
| Isolation | Namespace/cgroup (shared kernel) | Sandboxed VM (capability-based) |
| Portability | Linux (mostly), architecture-specific | Any OS, any architecture |
| Filesystem | Full filesystem | Limited (virtual FS) |
| Syscall support | Full Linux syscalls | Limited WASI subset |
| Ecosystem | Massive, mature | Growing rapidly |
| Use cases | Everything | Functions, edge, plugins |
WASM won't replace containers. It lacks full OS compatibility, has limited filesystem access, and supports only a subset of syscalls. But for specific workloads — serverless functions, edge computing, plugin systems — it's strictly superior.
4. Unikernels
Unikernels are single-purpose machine images: your application compiled together with only the OS components it actually needs into one bootable image.
What's Removed
- No shell — can't
execinto it - No SSH — no remote access
- No unnecessary drivers — only what the app uses
- No package manager — nothing to install at runtime
- No multi-process support — single application, single address space
Benefits
- Tiny — images as small as 1–10 MB
- Fast boot — milliseconds (no OS initialization sequence)
- Minimal attack surface — no shell = no shell exploits
- Immutable — can't be modified at runtime
Examples
- MirageOS — OCaml-based, pioneered the concept
- Nanos — Run existing Linux binaries as unikernels
- OSv — JVM-optimized unikernel
- Unikraft — Modular unikernel construction kit
Why They Haven't Caught On
- Debugging is brutal — no shell, no strace, no logs (unless built in)
- No ecosystem — can't apt-get install anything
- Build complexity — requires deep understanding of what the app needs
- Limited language support — not every language/framework works
5. MicroVMs
MicroVMs deliver VM-level isolation with container-like speed. They boot a minimal, purpose-built virtual machine in milliseconds.
Firecracker
Built by AWS for Lambda and Fargate. Key characteristics:
- ~125ms boot time — from API call to running code
- <5 MB memory overhead per microVM
- Separate kernel per workload — real VM isolation, not namespace tricks
- Thousands per host — density rivaling containers
- Minimal device model — only virtio-net, virtio-block, serial, and a clock
Other MicroVM Projects
- Cloud Hypervisor — Intel/Microsoft, similar goals to Firecracker
- QEMU microvm — Stripped-down QEMU machine type
- Kata Containers — OCI-compatible runtime using lightweight VMs
6. Confidential Containers
Confidential computing runs containers inside hardware-encrypted enclaves (Trusted Execution Environments — TEEs). Not even the host OS or cloud provider can inspect container memory.
Hardware Technologies
- Intel SGX — Enclave-based, application-level protection
- AMD SEV-SNP — Encrypts entire VM memory, hardware-attested
- ARM CCA — Confidential Compute Architecture for ARM processors
- Intel TDX — Trust Domain Extensions, VM-level confidentiality
Use Cases
- Processing sensitive data in untrusted clouds (multi-tenant)
- Regulated workloads (healthcare, finance) where the cloud operator must not access data
- Multi-party computation — combine data from competitors without revealing it
- AI model protection — run inference without exposing model weights
# Deploy a confidential container on Kubernetes
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: confidential-app
spec:
runtimeClassName: kata-cc # Confidential Containers runtime
containers:
- name: app
image: myregistry/sensitive-workload:latest
resources:
limits:
memory: "512Mi"
EOF
7. What This Means for You
Containers aren't going away. They're the foundation. But two shifts are happening:
- The abstraction is moving UP — you care less about the specific runtime (container? WASM? microVM?) and more about your workload definition
- The isolation is moving DOWN — from OS-level namespaces to hardware-level encryption and separate kernels
The future is multi-runtime: OCI containers, WASM modules, and microVMs — all managed by the same orchestrator (Kubernetes is already adding WASM support via runwasi).
What to Learn Now
- Containers — still the 90% case; master them first
- WASM/WASI — experiment with Spin or wasmtime for edge/function workloads
- Security boundaries — understand when namespace isolation isn't enough
- Orchestration abstractions — focus on declarative workload specs, not specific runtimes
Evolution of Isolation
Comparison: Technologies at a Glance
| Property | Containers | WASM | Unikernels | MicroVMs |
|---|---|---|---|---|
| Startup time | 1–10 s | <1 ms | ~10 ms | ~125 ms |
| Image size | 50 MB – 1 GB | 1–5 MB | 1–10 MB | 20–50 MB |
| Isolation | Namespaces (shared kernel) | Sandboxed VM | Separate kernel (VM) | Separate kernel (VM) |
| Maturity | Production (10+ years) | Early production | Research/niche | Production (AWS scale) |
| Debugging | Excellent (exec, logs) | Limited | Very difficult | Good (standard Linux) |
| Best use case | General workloads | Edge, functions, plugins | Embedded, IoT, NFV | Multi-tenant serverless |
- Cloudflare Workers — Runs customer code as WASM at 300+ edge locations; microsecond cold starts, thousands of isolates per process
- AWS Lambda — Uses Firecracker microVMs; boots a fresh VM per invocation in ~125ms with full tenant isolation
- Fastly Compute — WASM-based edge compute using Wasmtime; sub-millisecond startup
- Fly.io — Uses Firecracker to run full containers as microVMs worldwide
Hands-On: Run a WASM Module with Docker
# 1. Enable WASM support in Docker Desktop
# Settings → Features in development → Enable WASM
# 2. Run a WASM-based container
docker run --rm \
--runtime=io.containerd.wasmedge.v1 \
--platform=wasi/wasm \
secondstate/rust-example-hello:latest
# 3. Compare startup time — run a standard container
time docker run --rm alpine echo "hello from container"
# 4. Run a WASM container (notice the speed difference)
time docker run --rm \
--runtime=io.containerd.wasmedge.v1 \
--platform=wasi/wasm \
secondstate/rust-example-hello:latest
# 5. Inspect the image size difference
docker images secondstate/rust-example-hello
docker images alpine
What to observe: The WASM image is dramatically smaller and starts faster. The trade-off? It can only run WASM bytecode — no arbitrary Linux binaries, no shell access, no filesystem browsing.
Knowledge Check
Quiz 1: WASM Advantage
What is the PRIMARY advantage of WASM containers over traditional OCI containers for edge computing?
Quiz 2: Unikernel Adoption
Why haven't unikernels achieved widespread adoption despite their strong security and performance properties?
Quiz 3: Firecracker
What is Firecracker primarily used for at AWS?
Key Takeaways
- WASM offers microsecond cold starts and tiny binaries — ideal for edge and functions, but limited in syscall support
- Unikernels are minimal and secure but impractical for most teams due to debugging and ecosystem gaps
- MicroVMs (Firecracker) deliver VM isolation at near-container speed — proven at AWS scale
- Confidential containers use hardware encryption to protect workloads from the infrastructure itself
- The future is multi-runtime: containers, WASM, and microVMs coexisting under the same orchestration layer
- Learn containers deeply — they're the foundation everything else builds on