diff --git a/main.sh b/main.sh index 73125ac..6bf8911 100755 --- a/main.sh +++ b/main.sh @@ -142,9 +142,11 @@ ebpf() { } containerruntime() { + echo start install container runtime as docker isUbuntu=$(grep -c Ubuntu /etc/os-release) if [ "$isUbuntu" -gt 0 ]; then # Add Docker's official GPG key: + echo install docker with apt sudo apt-get update -y sudo apt-get install ca-certificates curl gnupg -y install -m 0755 -d /etc/apt/keyrings @@ -158,9 +160,9 @@ containerruntime() { apt-get update -y apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y else - sudo dnf -y install dnf-plugins-core - sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo - sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + sudo yum install -y yum-utils + sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y fi }