For platform-specific instructions, please consult the docker official documentation.
Alternative way of docker installation on Linux (Ubuntu, CentOS, …)
$ curl -fsSL https://get.docker.io | sh
type your password to install docker.
Run docker commands without sudo (required)
By default, you need sudo to execute docker commands.
To do so without sudo, add yourself to the system
$ sudo usermod -aG docker $USER
It will work after restarting your login session.
Install docker-compose (only for development/single-server setup)
You need to install docker-compose separately.
Check out the official documentation.