In dieser Anleitung zeigen wir, wie docker und docker compose auf einem Linux Debian 11 Server installiert werden kann.
Vorraussetzungen:
- SSH root Zugriff auf einen Linux Debian 11 Server
Schritt 1: Abhängigkeiten installieren
sudo apt update
sudo apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Schritt 2: Docker installieren
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y
Schritt 3: Installation von Docker Compose
curl -s https://api.github.com/repos/docker/compose/releases/latest | grep browser_download_url | grep docker-compose-linux-x86_64 | cut -d '"' -f 4 | wget -qi -
chmod +x docker-compose-linux-x86_64
sudo mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose