> For the complete documentation index, see [llms.txt](https://docs.hex-rays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hex-rays.com/editions-and-licenses/license-types/ida-pro-headless/how-tos/run-in-docker.md).

# Run IDA Pro Headless in Docker

On **Linux** (x64 and arm64) and **Windows x64**, the package includes a `docker/` folder to build a container image of IDA Pro Headless.

{% hint style="info" %}
A container shares the kernel of the machine it runs on. Docker on macOS runs Linux containers: use the image of the `armlinux` package there. On Windows x64, the image is a Windows container.
{% endhint %}

## Build the image

{% hint style="info" icon="desktop-arrow-down" %}

### Automate the download with HCLI

To build the image in a pipeline, let [HCLI](https://hcli.docs.hex-rays.com/) fetch the package first. Store an API key (`hcli auth key create --name docker-build`) as a CI secret named `HCLI_API_KEY`, then:

```bash
uvx --from ida-hcli hcli --disable-updates download release/ida-pro-headless/9.5/ida-pro-headless-9.5-x64linux.zip
unzip ida-pro-headless-9.5-x64linux.zip
```

See [CI/CD Integration](https://hcli.docs.hex-rays.com/advanced/ci-cd-integration/) in the HCLI documentation.
{% endhint %}

Build the image from the package folder:

```bash
cd ~/ida-pro-headless-9.5-x64linux
docker build -f docker/Dockerfile -t ida-pro-headless .
```

## Accept the license agreement

The image refuses to run until you accept the IDA license agreement. Read it (`ida-pro-headless-9.5/license.txt` in the package), then pass `IDA_ACCEPT_EULA=yes`:

```
$ docker run --rm ida-pro-headless
Read the IDA license agreement (ida-pro-headless-9.5/license.txt) and pass -e IDA_ACCEPT_EULA=yes.
```

## Check the license

By default, the container runs `check_license.py`:

```
$ docker run --rm -e IDA_ACCEPT_EULA=yes \
    -e IDA_LICENSE=server:host=licsrv.example.com:port=65434:instance=docker-worker \
    ida-pro-headless
License  XX-XXXX-XXXX-XX (floating)
Product  IDAPROHEADLESS, edition ida-pro-headless
...
Seat     docker-worker from licsrv.example.com:65434
```

## Analyze a binary

Mount the folder that holds your binaries and run your script, or one of the examples installed in `/opt/ida-pro-headless/examples`:

```bash
docker run --rm --user "$(id -u):$(id -g)" \
    -e IDA_ACCEPT_EULA=yes \
    -e IDA_LICENSE=server:host=licsrv.example.com:port=65434:instance=docker-worker \
    -v "$PWD/work:/work" \
    ida-pro-headless python /opt/ida-pro-headless/examples/list_functions.py /work/sample
```

The container runs as the user `ida`, never as root. With `--user "$(id -u):$(id -g)"`, it runs as you, so the databases and logs it writes into the mounted folder belong to you.

## Scale out

IDA's analysis is single-threaded. To analyze several binaries at once:

* give each container one CPU (`--cpus 1`),
* run one container per binary,
* make sure the containers can reach your license server.

Each container takes its own seat while it holds a database open. See [Headless seats](https://docs.hex-rays.com/editions-and-licenses/license-types/ida-pro-headless/concepts/headless-seats.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hex-rays.com/editions-and-licenses/license-types/ida-pro-headless/how-tos/run-in-docker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
