Compare commits
No commits in common. "274387b780b84feb430b442bbcd84ec73d10d2fb" and "0c35a87e1eeb83ef8d7bb2bd27a2e26ea666b010" have entirely different histories.
274387b780
...
0c35a87e1e
@ -1,24 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Script Name: docker-installer.v3.sh
|
||||
# Beschreibung: Docker & Docker-Compose Installer für "Ubuntu 22.04 Jammy" only
|
||||
# Beschreibung: Docker & Docker-Compose installieren und Docker-Root-Verzeichnis ändern (Für Ubuntu)
|
||||
# Aufruf: bash ./docker-installer.v3.sh
|
||||
# Autor: Patrick Asmus
|
||||
# Web: https://www.techniverse.net
|
||||
# Git-Reposit.: https://git.techniverse.net/scriptos/linux-docker-installer
|
||||
# Version: 3.3
|
||||
# Datum: 08.04.2024
|
||||
# Modifikation: Script now checks OS before installation
|
||||
# Git-Reposit.: https://git.techniverse.net/scriptos/docker-installer
|
||||
# Version: 3.2
|
||||
# Datum: 31.03.2024
|
||||
# Modifikation: Umstellung auf neue Domain
|
||||
#####################################################
|
||||
|
||||
# Betriebssystem und Version prüfen
|
||||
OS=$(lsb_release -is)
|
||||
VERSION=$(lsb_release -rs)
|
||||
|
||||
if [ "$OS" != "Ubuntu" ] || [ "$VERSION" != "22.04" ]; then
|
||||
echo "Dieses Script ist nur für Ubuntu 22.04 geeignet. Installation abgebrochen."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Variablen
|
||||
USER="root"
|
||||
DOCKER_ROOT_DIR="/docker"
|
||||
@ -33,7 +24,7 @@ sudo apt update
|
||||
sudo apt install -y docker-ce docker-ce-cli containerd.io
|
||||
sudo usermod -aG docker $USER
|
||||
|
||||
# Docker-Root-Verzeichnis ändern & Compose Verzeichnis erstellen
|
||||
# Docker-Root-Verzeichnis ändern
|
||||
sudo systemctl stop docker
|
||||
sudo mkdir -p $DOCKER_ROOT_DIR
|
||||
echo "{\"data-root\": \"$DOCKER_ROOT_DIR\"}" | sudo tee /etc/docker/daemon.json
|
||||
@ -41,6 +32,7 @@ cp /var/lib/docker/* $DOCKER_ROOT_DIR
|
||||
rm -R /var/lib/docker
|
||||
sudo systemctl start docker
|
||||
|
||||
# Erstelle Compose-Verzeichnis
|
||||
mkdir $COMPOSE_DIR
|
||||
|
||||
# Docker-compose installieren
|
Loading…
Reference in New Issue
Block a user