Skip to main content
novita template create builds a Dockerfile directly into a reusable sandbox template. It reads the Dockerfile, builds the image, applies sandbox settings (start / ready command, CPU, memory), and registers the result under the template name — which you can then pass to sandbox.create(...).

Usage

CLI

Argument

Options

Behavior and validation

  • Authentication is required: log in with novita auth login or set NOVITA_API_KEY in the environment.
  • Providing --cmd without --ready-cmd fails with Both start and ready commands must be provided.; --ready-cmd alone is allowed.
  • An invalid template name or an odd --memory-mb value aborts the build before anything is sent to the server.
  • Build logs are streamed to the terminal. On success the CLI prints Python / JS snippets showing how to create a sandbox from the new template.

Examples

An example Dockerfile used by the commands below:
Dockerfile

Minimal build

Reads ./novita.Dockerfile (or ./Dockerfile) in the current directory:
CLI

Specify a Dockerfile explicitly

Point the build at a specific Dockerfile relative to the root directory:
CLI

Full build

Custom root directory, resources, start/ready commands, and no cache:
CLI
Once the build finishes, create sandboxes from the template by name:
JavaScript & TypeScript
Last modified on September 4, 2026