docs: custom templates on v2 - #709
Merged
Merged
Conversation
…pace templates keep the pooled create and capture the home directory (which is where pip and npm already install), custom images bake system packages into the machine image the sandbox boots from; documents what customers will actually hit: builds take minutes so they are ahead-of-time and inline image: on create is refused, custom-image creates cold-start, the base is AL2023 with dnf rather than Ubuntu with apt, everything is ARM64, and an org holds 10 images with identical definitions deduped
…han offering a choice — there is one templates path in the API (define by name with Image, create with template:), so presenting 'workspace templates' vs 'custom images' invented a decision customers cannot make and named an internal mechanism they never see; the page now states the API is the same as v1 and covers only what is actually visible to them: build ahead of time, template creates cold-start, AL2023/ARM64 package and architecture caveats, the 10-per-org cap, and rebuilding v1 rootfs templates
…ere type-only exports, so the import the Image reference documents (import { Image } from "@opencomputer/sdk") failed at runtime with 'does not provide an export named Image', and there was no supported way to define a template through the SDK at all; caught by the first end-to-end template run, which could not import them
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
motatoes
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the templates docs for v2, and fixes the SDK export the docs depend on.
Why
The templates page said image builds were not supported on v2. They now are —
parity-microvm(#703) implements them — so the page described a gap that no longer exists.Docs
sandboxes/templates.mdx— leads with the contract being unchanged: sameImagebuilder, same names, sameSandbox.create({ template }). Existing definitions carry over as written.It then covers only what a customer can actually observe:
image:inline to a create is refused rather than timing out or silently returning a sandbox without the packages.aptInstallworks and common Debian names are translated (build-essential→gcc gcc-c++ make); a Debian-only package fails the build and the error names it. A step that downloads an x86-64 binary fails.An earlier draft offered a choice between "workspace templates" and "custom images". That was wrong — there is one templates path in the API, and "workspace template" named an internal mechanism customers never see. Removed, including a pre-existing use of the term in the migration guide.
Consistency fixes — pages that would otherwise contradict the above:
migrating-from-v1.mdx("Image builds are unavailable" / "no build pipeline in v2") andreference/typescript-sdk/image.mdx, which described the base as Ubuntu 22.04 withapt-get.SDK fix (why it is in this PR)
ImageandSnapshotswere exported as types only, soimport { Image } from "@opencomputer/sdk"— exactly what the Image reference documents — failed at runtime with "does not provide an export named 'Image'". There was no supported way to define a template through the SDK at all.Found by the first end-to-end template run, which could not import them. The docs here show that import, so the fix ships alongside. Also on #703; harmless if that merges first.
Validation
The flow these docs describe was run end to end against the dev cell:
treeis absent from the base image, so its presence confirms the customer's package came from their template.