今でもあなたは私の光丶

Docker 重新安装以及更新

基于:

LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core

安装:

yum update

# vim /etc/yum.repos.d/docker.repo

//添加以下内容

[dockerrepo]

name=Docker Repository

baseurl=https://yum.dockerproject.org/repo/main/centos/7/

enabled=1

gpgcheck=1

gpgkey=https://yum.dockerproject.org/gpg

# yum install docker-engine -y

启动service docker start

更新:

卸载旧版 docker

> rpm -qa | grep docker # 也可以使用 yum list installed | grep docker
docker-engine-1.13.0-1.el7.centos.x86_64
docker-engine-selinux-1.13.0-1.el7.centos.noarch
> yum remove docker-engine-1.13.0-1.el7.centos.x86_64
> yum remove docker-engine-selinux-1.13.0-1.el7.centos.noarch

升级至最新版

> curl -fsSL https://get.docker.com/ | sh

重启docker

> systemctl restart docker # centos 7
> service docker restart # centos 6

查看升级后的版本

> docker version # docker -v

发表评论

163 条评论 “Docker 重新安装以及更新”