„install.sh“ ändern

This commit is contained in:
Yann Mölle 2023-04-17 20:54:00 +02:00
parent d7a8d4b377
commit 760a5960df

View File

@ -24,32 +24,15 @@ fi
# Install Docker # Install Docker
echo "Installing Docker..." echo "Installing Docker..."
if [ "$DISTRO" = "debian" ] || [ "$DISTRO" = "ubuntu" ]; then if [ "$DISTRO" = "debian" ] || [ "$DISTRO" = "ubuntu" ]; then
apt-get update bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/debian.sh)"
apt-get install -y docker.io
elif [ "$DISTRO" = "redhat" ]; then elif [ "$DISTRO" = "redhat" ]; then
yum install -y docker bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/centos.sh)"
elif [ "$DISTRO" = "alpine" ]; then elif [ "$DISTRO" = "alpine" ]; then
apk add docker sh -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/alpine.sh)"
fi fi
# Start Docker # Start Docker
echo "Starting Docker..." echo "Starting Docker..."
systemctl start docker systemctl start docker
# Install Docker Compose
read -p "Do you want to install Docker Compose? (y/n) " INSTALL_COMPOSE
if [ "$INSTALL_COMPOSE" = "y" ]; then
echo "Installing Docker Compose..."
if [ "$DISTRO" = "debian" ] || [ "$DISTRO" = "ubuntu" ]; then
apt-get install -y docker-compose
elif [ "$DISTRO" = "redhat" ]; then
yum install -y epel-release
yum install -y python-pip
pip install docker-compose
elif [ "$DISTRO" = "alpine" ]; then
apk add py-pip
pip install docker-compose
fi
fi
echo "Docker and Docker Compose installation completed." echo "Docker and Docker Compose installation completed."