Skip to main content

Install packages

Common base-image helpers include from_ubuntu_image(), from_python_image(), from_bun_image(), from_dockerfile(), and from_dockerfile_content(). Package installers accept lists. For npm_install() and bun_install(), g=True performs a global install.

Files, repos, and commands

See the API reference for the full template build request and build_context upload schema. Use set_file_context() when a build needs a local context directory for copy steps. Use registry-auth helpers before pulling private images.

Environment, user, and workdir

Build envs are visible only during build steps. Runtime envs are persisted into machines launched from the template.

File operations

Render before build

Rendered templates are useful for review, CI diffs, and nullspace template render json|dockerfile parity.
Build resource and cache options live on the build call:
The same options are available on Template.build_in_background() and builder.to_json(...).