$ which curl
$ sudo apt-get update
$ sudo apt-get install curl
$ curl -sSL https://get.docker.com/ | sh
$ sudo docker run hello-world
ok
than
sudo docker run -d --restart=always -p 8080:8080 rancher/server
…
WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.
5ad230bc9af42a5e6a420037c0eb0643d1675ef9e11852e7dc3de653bf632e9d
Error response from daemon: Cannot start container 5ad230bc9af42a5e6a420037c0eb0643d1675ef9e11852e7dc3de653bf632e9d: Bind for 0.0.0.0:8080 failed: port is already allocated
Port 8080 is already in use by something on your computer. Change the first 8080 in the command to another port, or stop what is currently running on that port (netstat -anp | grep 8080.*LISTEN will tell you what process it is…)