Download the installation script from source
curl -fsSL https://get.docker.com -o get-docker.sh
Execute the installation script as sudo
sudo sh ./get-docker.sh
Allow docker daemon to run without sudo
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker