untainer
Get started

Docker images,running in this tab.

untainer turns an OCI image into static files and runs it as a container in a Linux VM compiled to WebAssembly. Only the parts a container reads are downloaded.

node:24-alpine

A Linux VM in this tab runs the official node:24-alpine image and starts an HTTP server in it.

192 of 646 chunks read until the server answered: 19.2 MB of 60.3 MB

Ready in 1.2 seconds.

One recorded cold start of node:24-alpine in Chrome 158, with the image served from the same machine, so the network costs nothing here. The bar is that run, drawn to scale.

  1. Loaded untainer14 ms
  2. Fetched the manifest6 ms
  3. Booted the VM211 ms
  4. Started node:24-alpine48 ms
  5. Ready945 ms

Build once, host anywhere.

  1. Build

    An OCI image becomes one read-only file system, cut into chunks named by their hash.

    sh
    untainer build node:24-alpine
    
    dist/node-24-alpine/
      manifest.json        how to run it
      layers/<hash>.json   the list of chunks
      chunks/              one file per chunk
    
  2. Host

    The result is static files. Any CDN serves them; so does a GitHub repository.

    sh
    untainer build node:24-alpine -o images/node-24-alpine
    git add images && git commit -m "add node-24-alpine"
    git tag node-24-alpine-v1 && git push --follow-tags
    
    # the image is now
    # gh:you/your-images/node-24-alpine#node-24-alpine-v1
    
  3. Run

    In Node or in a page, the same code. Every chunk is checked against its hash.

    main.ts
    import { createRuntime, loadImage } from 'untainer';
    
    const serve = "require('http').createServer((q, s) => s.end('hi')).listen(3000)";
    
    const rt = await createRuntime({ worker: true, memoryMiB: 256 });
    const image = await loadImage('/images/node-24-alpine/');
    const app = await rt.run(image, {
      cmd: ['node', '-e', serve],
      probe: 'http:3000/',
    });
    await app.ready();
    
    const res = await app.fetch('/', { port: 3000 });
    console.log(await res.text());
    

What it is not.

A VM in a tab is not a server. These are the four limits that decide whether untainer fits.

Read every limit
  • Not Docker

    The user space is emulated aarch64 (an interpreter and a JIT): CPU-heavy work runs slower than natively.

  • No incoming connections

    Containers reach each other and the page reaches them; nothing else does.

  • One memory pool

    All containers share the VM's memory, with no limit per container.

  • linux/arm64 images only

    Official images have them; your own need an arm64 build.

Run your first container in a tab.

untainer  OCI images as containers in a browser tab or in Node.