Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Last active April 25, 2024 02:35
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save zulhfreelancer/254c4a157c586dd232c1a51db0f6eac3 to your computer and use it in GitHub Desktop.
Save zulhfreelancer/254c4a157c586dd232c1a51db0f6eac3 to your computer and use it in GitHub Desktop.
Install Docker oneliner script

Just install Docker

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Install Docker and Rancher Server

$ 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

@exil0867
Copy link

exil0867 commented Feb 27, 2022

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 | bash
It'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.

@edneibach
Copy link

Neat!

@rimiti
Copy link

rimiti commented Apr 9, 2024

Thx

@treverehrfurth
Copy link

Does the curl command also install compose along with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment