> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom images (OCI & local Docker)

> Boot standard public OCI images or push local Docker, OrbStack, and Podman builds directly into KVM microVMs — no proprietary template DSL.

Vers runs standard **Linux/AMD64 OCI container images** directly inside
hardware-isolated Cloud Hypervisor KVM microVMs. You do not need to rewrite your
environment in a proprietary template DSL — Vers preserves your image's
`ENTRYPOINT`, `CMD`, `ENV`, `WORKDIR`, `USER`, and `STOPSIGNAL`, and injects the
lightweight platform init and guest agent outside your root filesystem.

## Option 1: Run a public registry image

`vers run` pulls directly from public registries (`docker.io`, `ghcr.io`,
`quay.io`, `public.ecr.aws`) and caches the imported image by digest:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers run --rm ghcr.io/astral-sh/uv:python3.12-bookworm-slim -- python3 --version
```

To pre-import an image once and reuse its immutable UUID across many computers
or API calls:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
image_id="$(vers image import docker.io/library/python:3.12-slim --json | jq -r '.image_id')"
vers run --detach "$image_id" -- sleep infinity
```

Programmatically, call `POST /api/v2/images` with a UUID `Idempotency-Key`:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
op_id="$(uuidgen | tr '[:upper:]' '[:lower:]')"

curl -fsSL -X POST https://api.vers.sh/api/v2/images \
  -H "Authorization: Bearer $VERS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $op_id" \
  -d '{
    "name": "python-3-12-slim",
    "source": {
      "type": "public_registry",
      "image_ref": "docker.io/library/python:3.12-slim"
    }
  }'
```

## Option 2: Push a local Docker, OrbStack, or Podman image

If your image lives in a private registry or was just built locally with
`docker build`, pass `--local`. The CLI exports the image from your local
container engine and uploads it directly — your private registry credentials
never leave your machine.

> [!NOTE]
>
> **Apple Silicon (macOS ARM64) users:** Vers computers run **Linux/AMD64**. When
> building locally on an M-series Mac, pass `--platform linux/amd64` to
> `docker build`:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
# Build a Linux/AMD64 image locally
docker build --platform linux/amd64 -t my-agent-env:dev .

# Push and run it immediately on Vers
vers run --local --detach --name agent-dev my-agent-env:dev -- sleep infinity
```

Or import it once into your Vers image catalog and reuse its UUID:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers image import --local my-agent-env:dev --name my-agent-env --json
```

Use `--container-engine docker` or `--container-engine podman` if you want to
select a specific local engine instead of `auto`.

## Overriding entrypoint, command, env, and workdir

You can override OCI runtime settings per computer without rebuilding the image:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers run --detach \
  -e NODE_ENV=test \
  -w /workspace \
  --entrypoint /bin/sh \
  docker.io/library/node:22-bookworm-slim \
  -- -c "sleep infinity"
```

Over `/api/v2/computers`, set `vm_config.command` (replaces entrypoint),
`vm_config.args` (replaces command arguments), `vm_config.working_dir`, and
`vm_config.env`.

## Managing your image catalog

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers image list
vers image inspect my-agent-env
vers image delete "$image_id" --yes
```

> [!NOTE]
>
> Image deletion requires the immutable image UUID (not an alias) and refuses to
> delete images referenced by live computers.

## Limits and performance best practices

| Limit | Current value |
| - | - |
| **Target architecture** | `linux/amd64` |
| **Max uncompressed rootfs** | `17 GiB` |
| **Max local upload archive** | `5 GB` |
| **Max computer shape** | `32 vCPU` · `32 GiB RAM` · `128 GiB root disk` |

* **Bake dependencies once, branch locally:** Install toolchains, `node_modules`,
  Python virtualenvs, and repo checkouts into your OCI image (or warm one
  computer and capture a checkpoint) *before* fanning out parallel branches.
  Branches clone internally from storage instead of repeating external downloads,
  cutting both cold-start latency and external network transfer.
* **Reuse immutable image UUIDs in tight loops:** Passing an already-imported
  `oci_image_id` skips registry resolution and goes straight to VM boot.

## Next steps

> [card] [Branching quickstart](https://docs.vers.sh/branching-quickstart.md)
>
> Warm your custom image once, checkpoint live state, and branch parallel copies.

> [card] [CLI image reference](https://docs.vers.sh/cli-reference/overview.md#images)
>
> Full flags, idempotency behavior, and JSON output fields for `vers image`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.