Update install_docker.sh

Adapt to Openeuler(24)
This commit is contained in:
赵璟 2025-01-03 14:27:03 +08:00 committed by GitHub
parent 37e5caf1fe
commit 0df2abb9d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,6 +106,13 @@ install_docker_custom() {
sudo mkdir -p /usr/local/lib/docker/cli-plugins/
sudo curl -SL "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/lib/docker/cli-plugins/docker-compose
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
elif [ "$lsb_dist" = "openeuler" ]; then
sudo dnf update -y
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo=https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's+$releasever+8+' /etc/yum.repos.d/docker-ce.repo
sudo dnf makecache
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
else
repos=("${repos_base[@]/%//${lsb_dist}/docker-ce.repo}")
sudo dnf remove -y podman || sudo yum remove -y podman
@ -204,4 +211,4 @@ command_exists() {
download_docker_script
# install docker
install_docker_official
install_docker_official