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

# Container Runtime Setup in Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx

> Choose and set up your preferred container runtime environment, Docker or Podman, for Aletyx Enterprise Build of Kogito and Drools.

Choose your preferred container runtime environment. We recommend either Docker or Podman.

## Docker Installation

<Tabs>
  <Tab title="Microsoft Windows">
    1. Install Docker Desktop:
       * Download [Docker Desktop®](https://www.docker.com/products/docker-desktop)
       * Run the installer
       * During installation, ensure "WSL 2" option is selected

    2. Post-installation:

       ```powershell theme={null}
       docker --version
       docker compose version
       ```

    3. Test Docker

       ```powershell theme={null}
       docker run hello-world
       ```

    4. Configure WSL 2 (if not already done):

       ```powershell theme={null}
       wsl --install
       ```
  </Tab>

  <Tab title="MacOS">
    1. Install Docker Desktop using Homebrew:

       ```sh theme={null}
       brew install --cask docker
       ```

    2. Start Docker Desktop:

       ```sh theme={null}
       open -a Docker
       ```

    3. Wait for Docker to start, then verify

       ```sh theme={null}
       docker --version
       docker compose version
       ```

    4. Test Docker

       ```sh theme={null}
       docker run hello-world
       ```

    5. Optional: Add Docker completion to your shell (for zsh):

       ```sh theme={null}
       echo 'zstyle ":completion:*:*:docker:*" option-stacking yes' >> ~/.zshrc
       echo 'zstyle ":completion:*:*:docker-*:*" option-stacking yes' >> ~/.zshrc
       ```
  </Tab>

  <Tab title="Linux">
    1. Install Docker Engine:

       ```sh theme={null}
       # Add Docker's official GPG key
       sudo apt-get update
       sudo apt-get install ca-certificates curl gnupg
       sudo install -m 0755 -d /etc/apt/keyrings
       curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
       sudo chmod a+r /etc/apt/keyrings/docker.gpg
       ```

    2. Add the repository to Apt sources

       ```sh theme={null}
       echo \
         "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
         "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
         sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
       ```

    3. Install Docker packages

       ```sh theme={null}
       sudo apt-get update
       sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
       ```

    4. Post-installation steps:

       ```sh theme={null}
       # Add your user to the docker group
       sudo usermod -aG docker $USER
       ```

    5. Apply group changes (or log out and back in)

       ```sh theme={null}
       newgrp
       ```

    6. Test Docker

       ```sh theme={null}
       docker run hello-world
       ```
  </Tab>
</Tabs>

## Podman Installation

<Tabs>
  <Tab title="Windows">
    1. Install Podman Desktop™:
       * Download [Podman Desktop](https://podman-desktop.io/downloads/windows)
       * Run the installer - Follow the installation wizard

    2. Verify installation:

       ```powershell theme={null}
       podman --version
       podman machine init
       podman machine start
       ```
  </Tab>

  <Tab title="macOS">
    1. Install Podman using Homebrew:

       ```sh theme={null}
       brew install podman
       ```

    2. Initialize and start Podman:

       ```sh theme={null}
       # Initialize Podman machine
       podman machine init

       # Start Podman machine
       podman machine start

       # Verify installation
       podman --version

       # Test Podman
       podman run hello-world
       ```

    3. Optional: Add Podman completion to your shell (for zsh):

       ```sh theme={null}
       echo 'autoload -Uz compinit' >> ~/.zshrc
       echo 'compinit' >> ~/.zshrc
       ```
  </Tab>

  <Tab title="Linux">
    1. Install Podman:

       ```sh theme={null}
       # Ubuntu/Debian
       sudo apt-get update
       sudo apt-get install -y podman
       ```

    2. Verify installation

       ```sh theme={null}
       podman --version
       ```

    3. Test Podman

       ```sh theme={null}
       podman run hello-world
       ```
  </Tab>
</Tabs>

## Container Compose Setup

<Tabs>
  <Tab title="Docker Compose">
    Docker Compose is included with Docker Desktop for Windows and macOS.

    ### For Linux:

    ```sh theme={null}
    # Install Docker Compose plugin
    sudo apt-get update
    sudo apt-get install docker-compose-plugin

    # Verify installation
    docker compose version
    ```
  </Tab>

  <Tab title="Podman Compose™">
    ```sh theme={null}
    # Install Podman Compose using pip
    pip3 install podman-compose

    # Verify installation
    podman-compose version
    ```
  </Tab>
</Tabs>

## Container Configuration

<Tabs>
  <Tab title="Docker">
    Configure Docker resources (in Docker Desktop):

    1. Open Docker Desktop
    2. Go to Settings (⚙️)
    3. Recommended settings: - CPUs: At least 2 - Memory: At least 4 GB - Swap: At least 1 GB - Disk image size: At least 60 GB
  </Tab>

  <Tab title="Podman">
    Configure Podman machine resources:

    ```sh theme={null}
    # Create a new machine with custom resources
    podman machine init --cpus 2 --memory 4096 --disk-size 60

    # Start the machine
    podman machine start
    ```
  </Tab>
</Tabs>

## Verify Installation

Test your container environment with a simple container:

<Tabs>
  <Tab title="Docker">
    1. Pull and run nginx

       ```sh theme={null}
       docker run -d -p 8080:80 --name test-nginx nginx
       ```

    2. Check container status

       ```sh theme={null}
       docker ps
       ```

    3. Stop and remove the container

       ```sh theme={null}
       docker stop test-nginx
       docker rm test-nginx
       ```
  </Tab>

  <Tab title="Podman">
    1. Pull and run nginx

       ```sh theme={null}
       podman run -d -p 8080:80 --name test-nginx nginx
       ```

    2. Check container status

       ```sh theme={null}
       podman ps
       ```

    3. Stop and remove the container

       ```sh theme={null}
       podman stop test-nginx
       podman rm test-nginx
       ```
  </Tab>
</Tabs>

## Troubleshooting

<Tabs>
  <Tab title="Docker Common issues and solutions">
    1. Reset Docker Desktop

       ```sh theme={null}
       docker system prune -a
       ```

    2. Check Docker status

       ```sh theme={null}
       docker info
       ```

    3. View Docker logs

       ```sh theme={null}
       docker logs <container-name>
       ```
  </Tab>

  <Tab title="Podman common issues and solutions">
    1. Reset Podman Machine

       ```sh theme={null}
       podman machine stop
       podman machine rm
       podman machine init
       podman machine start
       ```

    2. Check Podman status

       ```sh theme={null}
       podman info
       ```

    3. View Podman logs

       ```sh theme={null}
       podman logs <container-name>
       ```
  </Tab>
</Tabs>
