What is a sandbox template?

A sandbox template is a prepared image that new sandboxes start from. It can start from a Dockerfile or a base image, with packages and tools already installed. A new sandbox skips the install steps because the template already holds them.

Updated

What a template contains

A template starts from a base image. Its setup steps can install packages, copy files and set environment variables. Some templates also run a start command during the build.

Why it shortens the start

The setup runs once, when the template is built. Each new sandbox starts from the finished result. That makes the cold start shorter.

Builds and rebuilds

A change to one setup step rebuilds that step and every step after it. Build time is paid before the first sandbox starts.

Templates and snapshots

A template is a definition for new sandboxes. A snapshot is a saved state of a sandbox. Some providers save the result of a template build as a snapshot.

What to check on a provider

  • Which setup steps the provider accepts, such as packages, files and a start command.
  • How long a build takes, and when a build runs again.
  • Whether the template is kept as a snapshot or as an image.

Related terms

All glossary terms

Related