sudo systemctl stop docker

This commit is contained in:
scriptos 2024-02-24 18:21:31 +01:00
parent f6295efbd3
commit 0c2f11d129

View File

@ -7,7 +7,7 @@
# Git-Reposit.: https://git.media-techport.de/scriptos/docker-installer
# Version: 3.1.1
# Datum: 24.02.2024
# Modifikation: move old directory
# Modifikation: user is now added to the docker group earlier
#####################################################
# Variablen
@ -22,15 +22,15 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER
# Docker-Root-Verzeichnis ändern
sudo mkdir -p $DOCKER_ROOT_DIR
sudo systemctl stop docker
sudo mkdir -p $DOCKER_ROOT_DIR
echo "{\"data-root\": \"$DOCKER_ROOT_DIR\"}" | sudo tee /etc/docker/daemon.json
cp /var/lib/docker/* $DOCKER_ROOT_DIR
rm -R /var/lib/docker
sudo systemctl start docker
sudo usermod -aG docker $USER
# Erstelle Compose-Verzeichnis
mkdir $COMPOSE_DIR