Create a .sh file - eg. docker-install.sh
and paste following:
#!/bin/bash
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo systemctl enable docker
sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
Run sudo docker-install.sh
script