--container
Configures zshot to run inside a container. It is a shorthand for our current container guidance, so prefer it over setting the individual switches yourself; its effects may grow over time.
Today it:
- Disables the Chromium sandbox (equivalent to
--no-sandbox), which the sandbox’s kernel facilities are not granted by default in a container. - Sets
--disable-dev-shm-usage, so Chromium routes shared memory to a temp file instead of/dev/shm, which is small by default in most container runtimes. - On Linux, falls back to software rendering when no GPU is available.
- Releases a license activated during the run when the process exits, instead of caching the signed payload in the config file.
Because it disables the sandbox, it prints the same security warning as --no-sandbox (suppress with --quiet).
GPU detection keys on a DRM render node at /dev/dri/renderD*. To use a GPU in the container, map one in with --device /dev/dri. A setup that exposes only /dev/nvidia* without a render node falls back to software rendering; pass --software-rendering to force it explicitly, which always overrides the auto-detection.
Licenses in disposable containers
A container’s machine identifier comes from the container itself, so every fresh container looks like a new machine to the licensing server. Without --container, a serverless or otherwise disposable deployment spends an activation slot on every cold start until it reaches the license’s activation limit and drops to Free tier.
--container closes that loop: the run activates on start and releases the activation on exit, so the next container activates the same license cleanly. Pass the key with --license-key or ZSHOT_LICENSE; no writable config file is needed.
The release is best effort. It is bounded at five seconds, and a failure is logged without changing the exit code. A container killed outright, by SIGKILL or by the platform’s grace window running out, never reaches the release and holds its slot until it ages out server-side, so allow the container time to shut down on SIGTERM.
A run that boots from a cached or baked-in signed payload never contacts the licensing server and never releases anything, so --container is safe alongside --license-json.