Install Docker ANY Linux Distro

Docker Installer & Verifier

A production-ready bash script that detects whether Docker is already installed and, if not, installs Docker CE + the Docker Compose plugin using the official repository for your Linux distribution.

🚀 One-Line Download & Execute :
apt update && apt install -y curl && clear && curl -s https://docs.greenhome.stream/attachments/69 | bash

🇬🇧 English

Features

Requirements

Usage

Download and run:

curl -fsSL -o install-docker.sh https://example.com/install-docker.sh
chmod +x install-docker.sh
./install-docker.sh

Or if you already have it locally:

chmod +x install-docker.sh
./install-docker.sh

What it does, step by step

  1. Clears the screen and shows a banner.
  2. Sets up sudo — uses root if already root, otherwise requires sudo.
  3. Detects OS family via /etc/os-release and picks the right package manager.
  4. Checks if Docker is installed — verifies the binary, the daemon, and the Compose plugin.
  5. If everything is OK → exits with a green success message. Nothing is installed.
  6. If only Compose is missing → installs only the Compose plugin.
  7. If Docker is missing → adds the official Docker repository for your distro, installs docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, docker-compose-plugin, enables and starts the service, runs hello-world as a final sanity check, and adds your user to the docker group.

Exit codes

Troubleshooting


🇬🇷 Ελληνικά

Χαρακτηριστικά

Προϋποθέσεις

Χρήση

Κατεβάστε και τρέξτε:

curl -fsSL -o install-docker.sh https://example.com/install-docker.sh
chmod +x install-docker.sh
./install-docker.sh

Ή, αν το έχετε ήδη τοπικά:

chmod +x install-docker.sh
./install-docker.sh

Τι κάνει, βήμα προς βήμα

  1. Καθαρίζει την οθόνη και εμφανίζει banner.
  2. Ρυθμίζει sudo — χρησιμοποιεί root αν είστε ήδη root, διαφορετικά απαιτεί sudo.
  3. Εντοπίζει την οικογένεια OS μέσω του /etc/os-release και επιλέγει τον κατάλληλο package manager.
  4. Ελέγχει αν είναι εγκατεστημένο το Docker — επαληθεύει binary, daemon, και το Compose plugin.
  5. Αν όλα είναι εντάξει → τερματίζει με πράσινο μήνυμα επιτυχίας. Δεν εγκαθιστά τίποτα.
  6. Αν λείπει μόνο το Compose → εγκαθιστά μόνο το Compose plugin.
  7. Αν λείπει το Docker → προσθέτει το επίσημο αποθετήριο Docker για τη διανομή σας, εγκαθιστά docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, docker-compose-plugin, ενεργοποιεί και ξεκινά την υπηρεσία, τρέχει το hello-world ως τελικό έλεγχο, και προσθέτει τον χρήστη στην ομάδα docker.

Κωδικοί εξόδου

Αντιμετώπιση προβλημάτων


License

MIT — use, modify, and redistribute freely.


Revision #5
Created 2026-04-12 02:49:56 EEST by Green
Updated 2026-04-12 02:56:41 EEST by Green