Templates
Templates define the base environment for sandboxes.
What is a Template?
A template defines the base environment for a sandbox. It specifies the operating system, installed packages, runtime configuration, and resource allocation. When you create a sandbox, you choose a template -- and the sandbox starts with that environment ready to go.
Under the hood, templates are built from Dockerfiles. The build process converts your Dockerfile into a root filesystem image that Firecracker boots as a microVM.
How Templates Work
Dockerfile
|
v
Template Build (async)
|
v
Root Filesystem Image
|
v
Firecracker microVM (sandbox)- You submit a Dockerfile (or use a pre-built template).
- The build system processes the Dockerfile asynchronously via NATS.
- The resulting root filesystem image is stored and ready for sandbox creation.
- When you create a sandbox from a template, the image is loaded into a new Firecracker microVM.
Template Resources
Each template defines the resource allocation for its sandboxes:
| Resource | Default | Range |
|---|---|---|
| vCPU | 2 | 1 - 8 |
| Memory | 512 MB | 128 - 8192 MB |
| Disk | 20 GB | 20 GB (fixed) |
Resources are set at the template level. All sandboxes created from a template share the same resource allocation.
Pre-built vs Custom Templates
Lelantos provides six pre-built templates that cover common development environments. These are ready to use immediately -- no build step required.
For specialized workloads, you can build custom templates from any Dockerfile. Custom templates support the same resource configuration and go through an asynchronous build process.