> ## Documentation Index
> Fetch the complete documentation index at: https://www.jetify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# devbox generate dockerfile

> Generate a Dockerfile that replicates devbox shell

## Synopsis[​](#synopsis "Direct link to Synopsis")

Generate a Dockerfile that replicates devbox shell. Can be used to run devbox shell environment in
an OCI container.

```bash theme={null}
devbox generate dockerfile [flags]
```

## Options[​](#options "Direct link to Options")

| Option                | Description                                                                          |
| --------------------- | ------------------------------------------------------------------------------------ |
| `-c, --config string` | path to directory containing a devbox.json config file                               |
| `-f, --force`         | force overwrite existing files                                                       |
| `--root-user`         | use `root` as the user for container. Installs nix as single-user mode in Dockerfile |
| `-h, --help`          | help for dockerfile                                                                  |
| `-q, --quiet`         | Quiet mode: Suppresses logs.                                                         |

## SEE ALSO[​](#see-also "Direct link to SEE ALSO")

* [devbox generate](/docs/devbox/cli-reference/devbox-generate/) - Generate supporting files for
  your project

[Edit this page](https://github.com/jetify-com/docs/tree/main/docs/devbox/cli-reference/devbox-generate-dockerfile/index.mdx)
