$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
Thanks you @moonheart 🚀
Since Docker targets sh
for their script, you can do this even more portable:
wget -O- get.docker.com | sh
(by @moonheart) or curl -fsSL get.docker.com | sh
(by @exil0867)
Also, there is a --dry-run
key which would show all commands (but not run them!) that Docker installation script would execute for your system.
wget -O- get.docker.com | bash