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:

Running a WASM module with Docker
# 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

Solomon Hykes (Docker co-founder): "If WASM+WASI existed in 2008, we wouldn't have needed to create Docker. That's how important it is."
Property OCI Containers WASM Modules
Image size50 MB – 1 GB1–5 MB
Cold start1–10 seconds<1 millisecond
IsolationNamespace/cgroup (shared kernel)Sandboxed VM (capability-based)
PortabilityLinux (mostly), architecture-specificAny OS, any architecture
FilesystemFull filesystemLimited (virtual FS)
Syscall supportFull Linux syscallsLimited WASI subset
EcosystemMassive, matureGrowing rapidly
Use casesEverythingFunctions, 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 exec into 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
Best of both worlds: MicroVMs give you strong isolation (separate kernel, no shared attack surface) with near-container performance. This is why AWS uses Firecracker for Lambda — millions of functions need both speed AND tenant isolation.

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
Confidential Containers with Kata + SEV
# 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:

  1. The abstraction is moving UP — you care less about the specific runtime (container? WASM? microVM?) and more about your workload definition
  2. 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

Bare Metal 1960s–1990s No isolation One app per machine Virtual Machines 2000s Full OS per VM Strong isolation Heavy (~GBs) Containers 2013+ Shared kernel Lightweight ~100 MB images WASM / MicroVMs / Unikernels 2020s+ μs cold start HW isolation ~1–5 MB Smaller → Faster → More Isolated → More Portable

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
🏭 In Production Today:
  • 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

Try Docker + WASM (requires Docker Desktop 4.15+)
# 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