您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
小编给大家分享一下如何检查Docker版本以及重装Docker,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
检查 Docker 版本
[root@Docker ]# docker version Client: Docker Engine - Community Version: 19.03.8 API version: 1.40 Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:27:04 2020 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.8 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:25:42 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683
查看所有仓库中所有docker版本,并选择特定的版本安装
[root@Docker ]# yum list docker-ce --showduplicates | sort -r * updates: mirrors.aliyun.com Loading mirror speeds from cached hostfile Loaded plugins: fastestmirror * extras: mirrors.ustc.edu.cn * epel: hkg.mirror.rackspace.com docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.7-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.6-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.5-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.4-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.3-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.0-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.9-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.8-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.7-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.6-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.4-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.3-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.2-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable docker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable * base: mirrors.aliyun.com Available Packages
重装 Docker
安装 docker-ce-18.06.0.ce
[root@Docker ]# yum remove docker docker-common docker-selinux docker-engine -y [root@Docker ]# yum install -y docker-ce-18.06.0.ce
可能会遇到的报错
file /usr/share/zsh/vendor-completions/_docker from install of docker-ce-18.06.0.ce-3.el7.x86_64 conflicts with file from package docker-ce-cli-1:19.03.8-3.el7.x86_64 Error Summary
解决方法
卸载 docker-ce-cli-1:19.03.8-3.el7.x86_64 -y
[root@Docker ]# yum erase docker-ce-cli-1:19.03.8-3.el7.x86_64 -y
再次安装 docker-ce-18.06.0.ce
[root@Docker ]# yum install -y docker-ce-18.06.0.ce [root@Docker ]# systemctl start docker [root@Docker ]# systemctl enable docker Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. [root@Docker ]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/docker.service.d └─kolla.conf Active: active (running) since Mon 2020-03-30 14:25:00 EDT; 24s ago Docs: https://docs.docker.com Main PID: 21775 (dockerd) CGroup: /system.slice/docker.service ├─21775 /usr/bin/dockerd └─21782 docker-containerd --config /var/run/docker/containe... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack dockerd[21775 ]: time="2020-0... Mar 30 14:25:00 openstack systemd[1 ]: Started Docker A... Hint: Some lines were ellipsized, use -l to show in full.
查看 Docker 版本信息
[root@Docker ~]# docker --version Docker version 18.06.0-ce, build 0ffa825 [root@Docker ~]# docker version Client: Version: 18.06.0-ce API version: 1.38 Go version: go1.10.3 Git commit: 0ffa825 Built: Wed Jul 18 19:08:18 2018 OS/Arch: linux/amd64 Experimental: false Server: Engine: Version: 18.06.0-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: 0ffa825 Built: Wed Jul 18 19:10:42 2018 OS/Arch: linux/amd64 Experimental: false
看完了这篇文章,相信你对“如何检查Docker版本以及重装Docker”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。