Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Last active August 6, 2026 05:44
Show Gist options
  • Select an option

  • Save zulhfreelancer/254c4a157c586dd232c1a51db0f6eac3 to your computer and use it in GitHub Desktop.

Select an option

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

@Zorlin

Zorlin commented May 17, 2024

Copy link
Copy Markdown

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

@moonheart

Copy link
Copy Markdown

wget -O- get.docker.com | bash

@vitoo

vitoo commented Dec 12, 2024

Copy link
Copy Markdown

Thanks you @moonheart 🚀

@sociopart

sociopart commented Mar 22, 2025

Copy link
Copy Markdown

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.

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