# kosa8 template

Build what new sandboxes start with, from a Dockerfile

A template is an image built from a Dockerfile, kept on this machine, that a
new sandbox starts with: `kosa8 sandbox create --template NAME`. Its sessions,
terminals and code runs then use that image unless told otherwise.

The build runs in a sandbox made for it and deleted after, so the Dockerfile's
RUN steps run sealed, under --egress (any by default, since builds fetch
packages; give --egress allow:pypi.org,files.pythonhosted.org to narrow it).

## Example

```
  kosa8 template build py ./env
  kosa8 template ls
  kosa8 sandbox create dev --template py
```

## Subcommands

- [`kosa8 template build`](https://docs.kosa8.com/reference/template-build.md): Build a template from a Dockerfile
- [`kosa8 template ls`](https://docs.kosa8.com/reference/template-ls.md): List templates
- [`kosa8 template rm`](https://docs.kosa8.com/reference/template-rm.md): Delete a template (sandboxes made from it keep their copy)

---
Source: https://docs.kosa8.com/reference/template/
