These are the minimum steps needed to setup docker on a RPi running Ubuntu Server. I am using an Ubuntu Server 20.04 (arm64) version (see previous post about how to set it up)
– Clean-up (optional)

sudo apt-get remove docker docker.io containerd runc

– Install dependencies

sudo apt install -y apt-transport-https gnupg-agent

– Add Docker PGP certificate

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

– Add repository

sudo add-apt-repository \
    "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable"

– Install Docker

sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io

– Add `ubuntu` user to `docker` group (you need to re-login to take effect)

sudo usermod -aG docker ubuntu

– Optionally verify everything works

docker run --name hello hello-world
docker rm hello
docker rmi hello-world

And that’s all that is needed.