# kosa8 template build

Build a template from a Dockerfile

## Usage

```
kosa8 template build NAME [PATH]
```

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--build-arg` | stringArray | build-time variable KEY=VALUE | `[]` |
| `--egress` | string | network policy for the build: any (default), deny, or allow:HOST[,HOST…] |  |
| `--file, -f` | string | Dockerfile name within the context | `Dockerfile` |
| `--replace` | bool | build again over an existing template of the same name |  |

## Example

```
  kosa8 template build py ./env
  kosa8 template build py -f Dockerfile.agent --build-arg PY=3.12 --replace .
```

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