> For the complete documentation index, see [llms.txt](https://docs.interactive.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.interactive.ai/cli/iai_images_build.md).

# iai images build

Build a container image with Docker

## Synopsis

Build a container image using the local Docker CLI.

This is a thin wrapper around 'docker build' that requires an explicit tag, Dockerfile, and build context.

```
iai images build [image_name] [flags]
```

## Examples

```
  iai images build my-service --tag 1.2.3
  iai images build my-service --tag 1.2.3 --file docker/Dockerfile --context .
  iai images build my-service --tag 1.2.3 --platform linux/amd64
```

## Options

```
  -c, --context string    Build context directory (default: current directory) (default ".")
  -f, --file string       Path to the Dockerfile (default: ./Dockerfile) (default "Dockerfile")
  -h, --help              help for build
      --platform string   Target platform for the build (currently only linux/amd64 is supported) (default "linux/amd64")
  -t, --tag string        Tag suffix to append to the fixed registry (e.g. 1.2.3)
```

## Options inherited from parent commands

```
      --api-key string               API key for authentication
      --cfg-file string              Path to YAML config file with organization, project, and optional service definitions
      --deployment-hostname string   Hostname for the deployment API (default "https://deployment.interactive.ai")
      --hostname string              Hostname for the API (default "https://app.interactive.ai")
```

## SEE ALSO

* [iai images](/cli/iai_images.md) - Build and push container images


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.interactive.ai/cli/iai_images_build.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
