$ 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
Neat!
Thx
Does the curl command also install compose along with it?
Does the curl command also install compose along with it?
Compose is part of Docker now, but it's docker compose as opposed to docker-compose
wget -O- get.docker.com | bash
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.
I don't think there is a need for
-o, you can just directly pipe the script into bash using$ curl -fsSL get.docker.com | bashIt's shorter and easier to memorize.
But you shouldn't use it if for security reasons you need to inspect the script before executing it.