curl -fsSL https://get.docker.com -o get-docker.sh # Download docker installer script.
sudo sh get-docker.sh # Install docker by running installer script.
# Optional commands for easier use:
rm get-docker.sh # Removes the installer script.
usermod -aG docker $USER # To remove the need for 'sudo' in front of every docker command.
newgrp docker # To activate the previous command, if you still need 'sudo' restart your computer.