Setting Up Docker on Proxmox

Option 1: Running Docker in a Linux VM (Best Practice)

This approach is recommended for full compatibility and security, as Docker and Proxmox kernels may conflict.

1. Create a Linux VM

2. Install Docker in the VM

  1. Update the system:

    sudo apt update && sudo apt upgrade -y
  2. Install Docker:

    sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt update
    sudo apt install -y docker-ce docker-ce-cli containerd.io
  3. Verify the installation:

    docker --version
  4. (Optional) Add your user to the Docker group:

    sudo usermod -aG docker $USER
  5. Install Docker Compose:

    sudo apt install docker-compose

Key Benefits of Option 1

Note: Always allocate sufficient resources to your VM to ensure smooth Docker operation, especially for large workloads.