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

# Can I specify a Dockerfile and let W&B build a Docker image for me?

Yes. You can provide your own Dockerfile and have W\&B Launch build the image for your run. This lets you control the build environment while still using Launch to queue and run jobs. This approach works well for projects with stable requirements but changing codebases.

<Warning>
  Format your Dockerfile to use mounts. For details, see the [Docker mounts documentation](https://docs.docker.com/build/guide/mounts/).
</Warning>

After you configure the Dockerfile, specify it to W\&B in one of the following ways:

* Use `Dockerfile.wandb`
* Use W\&B CLI
* Use W\&B App

<Tabs>
  <Tab title="Dockerfile.wandb">
    Include a `Dockerfile.wandb` file in the same directory as the W\&B run's entrypoint. W\&B uses this file instead of the built-in Dockerfile.
  </Tab>

  <Tab title="W&B CLI">
    To queue a job, use the `--dockerfile` flag with the `wandb launch` command:

    ```bash theme={null}
    wandb launch --dockerfile path/to/Dockerfile
    ```
  </Tab>

  <Tab title="W&B App">
    When you add a job to a queue in the W\&B App, provide the Dockerfile path in the **Overrides** section. Enter it as a key-value pair with `"dockerfile"` as the key and the path as the value.

    The following JSON shows how to include a Dockerfile from a local directory:

    ```json title="Launch job W&B App" theme={null}
    {
      "args": [],
      "run_config": {
        "lr": 0,
        "batch_size": 0,
        "epochs": 0
      },
      "entrypoint": [],
      "dockerfile": "./Dockerfile"
    }
    ```
  </Tab>
</Tabs>
