赞
踩
本文讲解如何在RedHat 7.6 Linux系统上安装Docker当前最新的稳定版本19.03.12
,你也可以参考官方的安装文档。
centos-extras
仓库cat <<EOF > /etc/yum.repos.d/centos-extras.repo
[centos-7-extras]
name=CentOS 7 Extras Repository
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
enabled=1
gpgcheck=0
EOF
~]# yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
yum-utils
包(用来提供yum-config-manager功能)。~]# yum install -y yum-utils
~]# yum-config-manager --add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
~]# yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repo id repo name status
centos-7-extras CentOS 7 Extras Repository 413
docker-ce-stable/x86_64 Docker CE Stable - x86_64 79
repolist: 492
注:由于我们使用的是稳定版
Stable Version
,不要去启用nightly
和test
仓库,因此,在docker-ce.repo里面其实只有一个仓库docker-ce-stable
是启用着的。
~]# yum info docker-ce | grep -i version
Version : 19.03.12
~]# yum install docker-ce docker-ce-cli containerd.io
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.2.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: container
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。