curl -fsSL https://get.docker.com -o /tmp/get-docker.sh && sudo sh /tmp/get-docker.sh &&
sudo usermod -aG docker $USER && newgrp docker &&
newgrp docker &&
sudo curl -L "github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose &&
sudo chmod +x /usr/bin/docker-compose
This is the esiest way to install docker on Ubuntu
https://www.youtube.com/watch?v=M7_mZXh8h8A
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737
<...>
sSL https://download.dockercurl -f.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
modprobe kvm_intel # Intel processors
$ modprobe kvm_amd # AMD processors
rm -r $HOME/.docker/desktop
$ sudo rm /usr/local/bin/com.docker.cli
$ sudo apt purge docker-desktop
sudo apt remove docker-desktop