> 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/cortex-xsoar-8-on-prem/8.10/configure-cortex-xsoar/engines/install-an-engine/docker/install-docker/install-docker-distribution-for-red-hat-on-an-engine-server.md).

# Install Docker distribution for Red Hat on an engine server

Install Docker for Red Hat on a Cortex XSOAR 8.10 On-prem engine server.

Red Hat maintains its own package of Docker, which is the version used in OpenShift Container Platform environments, and is available in the RHEL Extras repository.

{% hint style="info" %}

### Note

If running RHEL v8 or higher, the engine installs [Podman](/cortex-xsoar-8-on-prem/8.10/configure-cortex-xsoar/engines/install-an-engine/podman.md) packages and configures the operating system to enable Podman in rootless mode.
{% endhint %}

For more information about the different packages available to install on Red Hat, see the [Red Hat Knowledge Base Article](https://access.redhat.com/solutions/3092401) (requires a Red Hat subscription to access).

1. Install [Red Hat’s Docker package](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html-single/getting_started_with_containers/index#using_the_docker_command_and_service).
2. Run the following commands.

   **`systemctl enable docker.service`**

   **`systemctl restart docker.service`**
3. Change ownership of the Docker daemon socket so members of the **`dockerroot`** user group have access.
   1. Edit or create the file `/etc/docker/daemon.json`.
   2. Enable OS group **`dockerroot`** access to Docker by adding the following entry to the `/etc/docker/daemon.json: "group": "dockerroot"`file. For example:

      **`{ "group": "dockerroot" }`**
   3. Restart the Docker service by running the following command.

      **`systemctl restart docker.service`**
   4. [Install an engine](/cortex-xsoar-8-on-prem/8.10/configure-cortex-xsoar/engines/install-an-engine.md).
   5. After the engine is installed, run the following command to add the **`demisto`** os user to the **`dockerroot`** os group (Red Hat uses dockerroot group instead of docker).

      **`usermod -aG dockerroot demisto`**
   6. Restart the engine.
4. Set the required SELinux permissions.

   The Cortex XSOAR engine uses the `/var/lib/demisto/temp` directory (with subdirs) to copy files and receive files from running Docker containers. By default, when SELinux is in **enforcing** mode directories under **`/var/lib/`** it cannot be accessed by Docker containers.

   1. To allow containers access to the `/var/lib/demisto/temp` directory, you need to set the correct SELinux policy type, by typing the following command.

      **`chcon -Rt svirt_sandbox_file_t /var/lib/demisto/temp`**
   2. ( Optional) Verify that the directory has the **`container_file_t`** SELinux type attached by running the following command.

      **`ls -d -Z /var/lib/demisto/temp`**
   3. Configure label confinement to allow Python and PowerShell containers to access other script folders.

      In the d1.conf file, set the following parameters:

      |                           | Key                        | Value                                   |
      | ------------------------- | -------------------------- | --------------------------------------- |
      | For Python containers     | python.pass.extra.keys     | --security-opt=label=level:s0:c100,c200 |
      | For PowerShell containers | powershell.pass.extra.keys | --security-opt=label=level:s0:c100,c200 |
   4. Open any incident and in the incident War Room CLI, run the **`/reset_containers`** command.


---

# 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://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.10/configure-cortex-xsoar/engines/install-an-engine/docker/install-docker/install-docker-distribution-for-red-hat-on-an-engine-server.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.
