If you have a Debian-Based Operating System you can use the docker.io package.
apt install docker.io
If you are using a docker supported OS that does not have the docker.io package, you should take a look at this page.
You can also use the docker install script by running:
wget -qO- https://get.docker.com/ | sh
wget https://raw.githubusercontent.com/Secure-Compliance-Solutions-LLC/GVM-Docker/docker-install/install-dockercompose.sh
bash install-dockercompose.sh
wget https://raw.githubusercontent.com/Secure-Compliance-Solutions-LLC/GVM-Docker/docker-install/docker-cleanup.sh
bash docker-cleanup.sh