sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
sudo gedit /etc/apt/sources.list.d/docker.list
copy this line: deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable save file!
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt update
sudo apt install docker-ce
Add the docker group if it doesn't already exist: sudo groupadd docker
sudo gpasswd -a $USER docker
Either do a newgrp docker or log out/in to activate the changes to groups.
to check if you can run docker without sudo.