本站文章总数为:165
Search Posts

centos docker卸载重装指定版本

内容纲要

1.卸载

yum remove docker* -y

2.下载脚本

curl -fsSL https://get.docker.com -o install-docker.sh

3.安装指定版本

sh install-docker.sh --version 20.10.22

4.设置开机启动

systemctl start docker
systemctl enable docker
systemctl status docker

国内镜像源安装

第三步改为

sh install-docker.sh --mirror Aliyun --version 20.10.22

如果系统是centos steam 8再执行上一步

yum remove podman -y
yum remove buildah -y
yum install runc -y

不然可能报

[root@localhost ~]# sh install-docker.sh --mirror Aliyun --version 20.10.22
# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de
+ sh -c 'yum install -y -q yum-utils'

Installed:
  yum-utils-4.0.21-25.el8.noarch                                                                                                                                                                                                   

+ sh -c 'yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo'
Adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
CentOS Stream 8 - AppStream                                                                                                                                                                        6.8 kB/s | 4.4 kB     00:00    
CentOS Stream 8 - BaseOS                                                                                                                                                                           6.0 kB/s | 3.9 kB     00:00    
CentOS Stream 8 - Extras                                                                                                                                                                           4.4 kB/s | 2.9 kB     00:00    
CentOS Stream 8 - Extras common packages                                                                                                                                                           4.6 kB/s | 3.0 kB     00:00    
Docker CE Stable - x86_64                                                                                                                                                                          107 kB/s |  60 kB     00:00    
Metadata cache created.
INFO: Searching repository for VERSION '20.10.22'
INFO: yum list --showduplicates docker-ce | grep '20.10.22.*el' | tail -1 | awk '{print $2}'
+ sh -c 'yum install -y -q docker-ce-20.10.22-3.el8 docker-ce-cli-20.10.22-3.el8 containerd.io docker-compose-plugin docker-ce-rootless-extras-20.10.22-3.el8'
Error: 
 Problem 1: problem with installed package podman-3:4.9.2-1.module_el8+899+3d7192e3.x86_64
  - package podman-3:4.9.2-1.module_el8+899+3d7192e3.x86_64 from @System requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-3.1.0-0.13.module_el8.5.0+733+9bb5dffa.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
   Problem: problem with installed package buildah-2:1.33.5-1.module_el8+885+7da147f3.x86_64
  - package buildah-2:1.33.5-1.module_el8+885+7da147f3.x86_64 from @System requires runc >= 1.0.0-26, but none of the providers can be installed
  - package buildah-1.19.8-1.module_el8.5.0+733+9bb5dffa.x86_64 from appstream requires runc >= 1.0.0-26, but none of the providers can be installed

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注