{"id":"9c88d9ed-9ae1-4d11-be58-c70e283adb8d","task":"Choose a runtime image (managed or custom) for a Vercel Sandbox, install system packages, and run privileged workloads (Docker, VPN clients, FUSE) inside it using sudo.","domain":"vercel.com","steps":["For a managed image, pass `image` to `Sandbox.create()`: options include `vercel/sandbox/universal` (default; Node.js LTS 24, Python 3.14, coding agents, utilities), `vercel/sandbox/node:22|24|26`, `vercel/sandbox/python:3.14`, `vercel/sandbox/arch:latest`, `vercel/sandbox/ubuntu:latest`. Docs: https://vercel.com/docs/sandbox/concepts/images","Pin to a specific version or digest for reproducibility: `image: 'vercel/sandbox/universal@sha256:...'`.","For a custom image, build a Dockerfile and push it to Vercel Container Registry: `vercel vcr build docker . my-repository:latest --push`, then create the sandbox with `image: 'my-repository:latest'`. Custom images must be an optimized `linux/amd64` VCR build; `Sandbox.create()` returns `image_not_ready` if VCR is still preparing it.","Install packages or run privileged workloads at runtime with `sudo: true`, e.g. `await sandbox.runCommand({ cmd: 'apt-get', args: ['install', '-y', 'ffmpeg'], sudo: true })` (Python: `sandbox.run_command('apt-get', ['install', '-y', 'ffmpeg'], sudo=True)`). Via the CLI: `sandbox exec --sudo <name> -- apt-get install -y ffmpeg`, or `sandbox connect --sudo <name>` for an interactive privileged shell.","Know the sudo identity: each sandbox runs in its own Firecracker microVM with a dedicated kernel, so `sudo`-level workloads (Docker, VPN clients, FUSE filesystems) are isolated to that sandbox; `sudo` commands run as user `vercel-sandbox` with root home directory set to `/root`.","If running containers (e.g. Docker) inside the sandbox, their outbound traffic still passes through the sandbox's `networkPolicy` firewall, and containers do not automatically inherit the sandbox's proxy CA trust — mount and trust it explicitly if the firewall terminates TLS for transformation rules, e.g. `docker run -v /etc/pki/ca-trust/source/anchors/vercel-proxy-ca.pem:/usr/local/share/ca-certificates/vercel-proxy-ca.crt:ro my-image sh -c \"update-ca-certificates && my-command\"`."],"gotchas":["Vercel Sandbox does NOT run Docker `ENTRYPOINT` or `CMD` for custom images — you must start processes explicitly with `sandbox.runCommand()` after creation, even for privileged/Docker-in-sandbox workloads.","If the Dockerfile defines `WORKDIR`, new commands start there; otherwise commands start from `/`, not `/vercel/sandbox`.","Containers run inside a sandbox do NOT automatically inherit the sandbox's proxy CA certificate or its `*_CA_BUNDLE`/`*_CERT` environment variables — HTTPS calls from inside a container can fail TLS verification if the firewall terminates traffic for transformation rules and the CA isn't installed in the container's own trust store; the exact install path/command depends on the base image (`update-ca-certificates` on Debian/Ubuntu vs `update-ca-trust` on Amazon Linux/Fedora/RHEL).","The deprecated `runtime` field (e.g. `\"node24\"`, `\"python3.13\"`) still works but new code should use `image` instead.","Using a smaller managed image (e.g. `vercel/sandbox/ubuntu` instead of `universal`) reduces individual snapshot sizes and therefore Snapshot Storage cost."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T01:29:50.188Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T01:29:50.188Z"},"url":"https://mcp.waymark.network/r/9c88d9ed-9ae1-4d11-be58-c70e283adb8d"}