> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-images-in-cortex-xsoar.md).

# Docker Images in Cortex XSOAR

**Docker Images**

Cortex XSOAR maintains a repository of Docker images, all of which are available in the [Docker hub under the Demisto organization](https://hub.docker.com/u/demisto/). The Docker image creation process is managed in the open-source project [demisto/dockerfiles](https://github.com/demisto/dockerfiles). A search of the [repository-info branch](https://github.com/demisto/dockerfiles-info/blob/master/README.md) should be done prior to creating a new image. The repository is updated nightly with all image metadata and os/python packages used in the images.

{% hint style="warning" %}

### Caution

For security, images that are not part of the Demisto organization in Docker hub cannot be accepted.
{% endhint %}

You have the option to use the [Cortex XSOAR private container registry](/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-images-in-cortex-xsoar/use-the-cortex-xsoar-container-registry.md), instead of the Docker hub. Docker images can also be [downloaded](/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-images-in-cortex-xsoar/install-docker-images-offline.md) and then copied to a Cortex XSOAR server without internet connectivity.

In a high availability deployment, when a custom Docker image is created by a user in Cortex XSOAR, only the application server that receives the command creates the Docker image locally. When a command requiring that image is run on another application server, the image is requested from the application cluster and a copy is created locally.

When an engine needs a Docker image it pulls it either from Docker Hub or from a custom registry, if defined in the server configuration: **`python.docker.registry`**.

The engine can fetch Docker images directly from the Cortex XSOAR server. If the engine fails to fetch the Docker image from the registry it tries to fetch it from the Cortex XSOAR server. The server packages the image when running **`docker save`**, and sends it to the engine, which enables the engine to obtain the required images, even if it does not have network access to the Docker Hub. The engine can only obtain images that are available from the server.

**Script and Integration Configuration**

Specify which Docker image to use in the Cortex XSOAR IDE (Open: Settings → **Docker image name**). If you do not specify an image, a default Docker image using Python 2.7 is used. New scripts and integrations use Python 3, unless there is a specific reason not to use it, such as a need to use a library which is not available for Python 3.

{% hint style="info" %}

### Note

You can specify in the Cortex XSOAR IDE the Python version (2.7 or 3.x). If 3.x is chosen, the latest Cortex XSOAR Python 3 Docker image is selected automatically.
{% endhint %}

The selected Docker image is configured in the script or integration YAML file under the **`dockerimage`** key.

If an existing image cannot be found, you can [create a Docker image](/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-images-in-cortex-xsoar/create-a-docker-image-in-cortex-xsoar.md).

**Update a Docker Image**

In some cases, a YAML file may specify to use the latest version of a Docker image, instead of a specific version name. In this case, or if a Docker image did not update due to connection issues when new content was downloaded, you can [update](/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-images-in-cortex-xsoar/manage-docker-images.md) a Docker image of a script or integration.

**Docker Files (Required for Production)**

If the integration is for public release, the integration pushes Docker files into the [dockerfiles repository](https://github.com/demisto/dockerfiles). Pushing into the repository will add an image (after the approval process) to the Docker hub Cortex XSOAR organization. For more information, see [Cortex XSOAR’s Dockerfiles and Image Build Management](https://github.com/demisto/dockerfiles/blob/master/README.md).

{% hint style="warning" %}

### Caution

When modifying an existing Docker image, ensure the change does not disrupt other integrations that may use the same package. All Docker images are created with unique version tags, for which overriding is blocked. When a new version of a Docker image is created, an integration using that image must specify the new version in the YAML file or specify that the latest version of the Docker image should be used.
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.13/learn-about-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-images-in-cortex-xsoar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
