# ezhst build dockerfile template

List starter Dockerfiles, print one, or save it to the app.

## Usage

```
ezhst build dockerfile template [id] [--apply]
```

Run it without an id to list every template with its group, for example `nextjs`, `nestjs`, `fastapi`, `django`, `rails`, `laravel`, `go`, `rust` or `vite`. Without `--apply` the template is printed, so you can save it to a file and edit it first.

## In scripts and agents

Add `--json` to read the result from stdout. Progress goes to stderr. On failure the process exits with code 1 and prints `{"error": "..."}`. Without a TTY the CLI never prompts, so pass every value as a flag.

```
npx ezhst build dockerfile template --json
```

## Related commands

- [`ezhst build show`](/docs/cli/build-show): Show the root directory and the stored Dockerfile.
- [`ezhst build set`](/docs/cli/build-set): Set the build context folder.
- [`ezhst build reset`](/docs/cli/build-reset): Clear the root directory and the Dockerfile.
- [`ezhst build dockerfile show`](/docs/cli/build-dockerfile-show): Print the Dockerfile stored on the app.
- [`ezhst build dockerfile set`](/docs/cli/build-dockerfile-set): Upload a Dockerfile to the app.
