
Start by opening a terminal window and updating the local repository:
sudo apt update
Wait for the process to complete.
Allow your Ubuntu 20.04 system to access the Docker repositories over HTTPS by running:
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
The above-mentioned command:
Next, add the GPG key to ensure the authenticity of the software package:
curl -fsSL <https://download.docker.com/linux/ubuntu/gpg> | sudo apt-key add -

Now install the Docker repository using the command: