dockerinstall.sh ist ein eigenständiges Single-File-Tool zur Verwaltung von Docker auf Linux-Systemen.
Es deckt den kompletten Lebenszyklus ab:
- Installation von Docker Engine & Plugins
- sauberes Upgrade bestehender Installationen
- vollständige Deinstallation (optional inkl. Daten)
- integrierter Self-Check und Backup-Funktion
- interaktive und nicht-interaktive Nutzung
Kein Framework, keine Abhängigkeiten – ein Skript, volle Kontrolle.
Getestet und produktiv genutzt auf:
- Debian 12 (Bookworm)
- Debian 13 (Trixie)
- Ubuntu 22.04 / 24.04 LTS
Distribution und Codename werden automatisch über /etc/os-release erkannt.
Installation
- entfernt alte oder konfliktbehaftete Docker-Pakete
- richtet das offizielle Docker-APT-Repository inkl. GPG-Key ein
- installiert Docker Engine, CLI, Buildx & Compose Plugin
- aktiviert systemd-Dienste
- optional: Benutzer zur
docker-Gruppe hinzufügen
Upgrade
- prüft und repariert Repository-Konfiguration
- reinstalliert Docker & Plugins sauber
- optional: Backup, Force-Upgrade, non-interactive
Uninstall
- entfernt Docker-Pakete, Repo & GPG-Keys
- optional: Docker-Daten behalten oder löschen
- systemd-Bereinigung
Self-Check
- Root-Rechte
- APT-Status & Locks
- curl / gpg
- systemd
- Schreibrechte unter
/var/lib - Docker-Status
Backup
.tar.gz-Backup von:/var/lib/docker/var/lib/containerd
Repository klonen:
git clone https://github.com/foxly-it/dockerinstall.git
cd dockerinstall
Interaktiv starten:
sudo ./dockerinstall.sh
Menü:
1) Installieren
2) Upgrade
9) Deinstallieren
sudo ./dockerinstall.sh [install|upgrade|uninstall] [OPTIONS]
Optionen:
--add-user=USER Benutzer zur docker-Gruppe hinzufügen
--no-hello Hello-World-Test überspringen
--no-clear Terminal nicht löschen
--log-file=PATH Eigenen Logpfad setzen
--non-interactive Keine Prompts, kein Menü
--backup-data Backup vor Upgrade/Uninstall
--force-upgrade Upgrade erzwingen
--self-check Nur Systemcheck ausführen
Beispiele:
sudo ./dockerinstall.sh install --no-hello
sudo ./dockerinstall.sh upgrade --backup-data --non-interactive
/var/log/docker-install.log
/var/log/docker-uninstall.log
Mitglieder der docker-Gruppe besitzen root-ähnliche Rechte.
Nur vertrauenswürdige Benutzer hinzufügen.
Docker Security Best Practices:
https://docs.docker.com/security/
dockerinstall.sh is a standalone single-file tool for managing Docker on Linux systems.
It covers the complete Docker lifecycle:
- installation of Docker Engine & plugins
- clean upgrades of existing installations
- full removal (optionally including data)
- integrated self-check and backup
- interactive and non-interactive operation
No frameworks, no dependencies — one script, full control.
Tested and used in production on:
- Debian 12 (Bookworm)
- Debian 13 (Trixie)
- Ubuntu 22.04 / 24.04 LTS
Distribution and codename are detected automatically via /etc/os-release.
Installation
- removes conflicting Docker packages
- sets up the official Docker APT repository incl. GPG key
- installs Docker Engine, CLI, Buildx & Compose plugin
- enables systemd services
- optional docker group user setup
Upgrade
- verifies and fixes repository configuration
- clean reinstall of Docker & plugins
- optional backup, force-upgrade, non-interactive mode
Uninstall
- removes Docker packages, repo and GPG keys
- optional data removal
- systemd cleanup
Self-Check
- root privileges
- APT status & locks
- curl / gpg
- systemd
- write access under
/var/lib - Docker status
Backup
- creates a
.tar.gzbackup of:/var/lib/docker/var/lib/containerd
Clone the repository:
git clone https://github.com/foxly-it/dockerinstall.git
cd dockerinstall
Run interactively:
sudo ./dockerinstall.sh
sudo ./dockerinstall.sh [install|upgrade|uninstall] [OPTIONS]
Members of the docker group have root-like privileges.
Only add trusted users.
MIT License
See LICENSE.
Foxly IT
Reboot required — but planned.