Step 6: Install Docker CE

  1. Inside AlmaLinux 8:

    sudo dnf update -y
    sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/8/x86_64/stable/
    sudo dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
    sudo systemctl enable docker
    sudo systemctl start docker
    sudo usermod -aG docker $USER
    newgrp docker
  2. Crucial step: After adding the user to the docker group, restart WSL:

    wsl --shutdown
  3. Restart AlmaLinux 8:

    wsl -d AlmaLinux8
  4. After the restart, verify the Docker installation:

    docker run hello-world