Install Snapd
apt install snapd
Install docker
sudo snap install docker
Login to docker hub
docker login
Or if have another container registry than docker
docker login https://myregistry.login
For better performance use apt to install the docker, because snapd and Flatpack uses sandbox to run the programs and may not give you 100% that you are expecting out of your machine. But with apt you have to make sure to install all the dependencies correctly.
The official link: https://docs.docker.com/engine/install/ubuntu/
Cheers and Peace Out !!!