On modern Linux systems you could use apt or yum to install Docker, but then you'd get a rather old and outdated version of Docker. The recommendation of the Docker development team is to download Docker directly from their web-site.
So this is what I recommend as well.
For MS Windows and I think also for Mac, there are two versions. "Docker for Windows" and "Docker for Mac" for the modern systems. The "Docker Toolbox" for the older versions of MS Windows and Apple Mac, or in case the modern system cannot be installed.
On Linux, you might also need to follow the "Linux post installation instructions".
- Install Docker
- Get Docker
- Debian/Ubuntu: apt-get install docker.io
- CentOS: yum install docker
- MS Windows: Download Docker Desktop for Windows
- Mac OSX: Download Docker for Mac OSX
- Post Install for Linux
- For older Windows and Mac Docker Toolbox