标签:.repo cat docke make 3.1 dock nim inux centos
系统上原有docker版本:17.09.0-ce,因业务需要使用 18 版本,本文档记录了docker升级的基本步骤。特别提醒??:操作前请现将重要数据文件进行备份,以免造成数据丢失!
系统信息和内核信息:
# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
# uname -r
3.10.0-514.26.2.el7.x86_64
Docker版本信息:
# docker version
Client:
Version: 17.09.0-ce
....
Server:
Version: 17.09.0-ce
....
yum remove -y docker-ce
rpm -e container-selinux
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
如果本步报错,内容如下:
-bash: yum-config-manager: 未找到命令
报错原因:
yum-config-manager 命令是在 yum-utils 软件包中的。某些发行版本中默认是不安装的!
处理方法:
# yum install -y yum-utils
# yum makecache
# yum install -y docker-ce
# systemctl start docker
# systemctl enable docker
# docker version
Client:
Version: 18.09.0
API version: 1.39
....
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
....
CentOS yum-config-manager command not found
标签:.repo cat docke make 3.1 dock nim inux centos
原文地址:http://blog.51cto.com/wutengfei/2321660