I was looking to set up a new server for a caching service that ran via Docker but the first step was to get Docker set up on a new Ubuntu Server install so I thought I would document the steps I took to get it installed, mainly for future reference so I don’t have to hit up Google for the process that works.
After the new install, make sure to perform an apt update and apt upgrade so you have all of the new packages installed.
Next you will want to install the following packages
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Next grab the GPG key from the Docker repository
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Then grab the Docker repository APT sources so you can actually install Docker
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
Now go ahead and install Docker
sudo apt install docker-ce