echo "Remove old instance" sudo apt remove \ $(dpkg --get-selections docker.io docker-compose docker-doc docker-buildx podman-docker containerd runc | cut -f1) echo "Add Docker's official GPG key" sudo apt update sudo apt install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo "Add the repository to Apt sources" sudo tee /etc/apt/sources.list.d/docker.sources <