Concepts

Images

Every workspace starts from a base image - a pre-configured environment with an operating system and optional software. You can install packages, write files, and make any changes - they persist across restarts until the workspace is deleted.

How images work

  • Changes you make persist across restarts
  • You can snapshot your workspace at any time
  • The base image provides the starting environment; your changes are additive

Choosing an image

Start with the runtime

If you know what language you're running, pick the runtime image directly:

// Node.js project
await ws.create({ image: 'node-20' });

// Python project
await ws.create({ image: 'python-3.12' });

// Go project
await ws.create({ image: 'go-1.22' });

Runtime images include the language, package manager, and common build tools on top of Ubuntu.

Start with the OS

If you need a clean slate or will install custom software:

// Minimal Ubuntu
await ws.create({ image: 'ubuntu-24' });

// Ultra-lightweight Alpine
await ws.create({ image: 'alpine-3' });

Need a database?

Database images come pre-configured and ready to accept connections:

await ws.create({ image: 'postgres-16' });
await ws.create({ image: 'redis-7' });

Image catalog

CategoryImage IDBased onIncludes
OSubuntu-22Ubuntu 22.04 LTScurl, wget, git, vim, build-essential
OSubuntu-24Ubuntu 24.04 LTScurl, wget, git, vim, build-essential
OSdebian-12Debian 12curl, wget, git, vim
OSalpine-3Alpine 3busybox, apk
Runtimenode-20Ubuntu + Node.js 20 LTSnode, npm, npx, yarn
Runtimenode-22Ubuntu + Node.js 22node, npm, npx, yarn
Runtimepython-3.12Ubuntu + Python 3.12python3, pip, venv
Runtimepython-3.13Ubuntu + Python 3.13python3, pip, venv
Runtimego-1.22Ubuntu + Go 1.22go, gofmt
Runtimerust-1Ubuntu + Rust stablerustc, cargo, rustup
Databaseredis-7Ubuntu + Redis 7redis-server, redis-cli
Databasepostgres-16Ubuntu + PostgreSQL 16pg, psql, pg_dump

Installing additional software

Every image supports package installation at runtime:

// Install packages after creation
await ws.exec(workspaceId, {
  cmd: ['apt-get', 'update', '&&', 'apt-get', 'install', '-y', 'ffmpeg'],
});

Or set a startup command:

await ws.create({
  image: 'ubuntu-24',
  config: {
    cmd: ['bash', '-c', 'apt-get update && apt-get install -y ffmpeg && sleep infinity'],
  },
});

Software installed at runtime persists across restarts but is lost when the workspace is deleted. Use snapshots to preserve complex setups.

Tips

  • Use runtime images when possible - they save setup time
  • Alpine is the smallest image (~5 MB) but uses musl libc, which may cause compatibility issues with some binaries
  • Database images auto-start the database service - no manual setup needed
  • Browse images programmatically via the Images API