# ezhst build dockerfile set

Upload a Dockerfile to the app.

## Usage

```
ezhst build dockerfile set -f <file>
```

Use `-f -` to read it from stdin. Then run `ezhst deploy` or `ezhst redeploy` to build with it. The app must listen on `0.0.0.0` and `$PORT`, which is 3000.

## 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 set -f --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 template`](/docs/cli/build-dockerfile-template): List starter Dockerfiles, print one, or save it to the app.
