CentOS 安装Docker

Posted by Beyonderwei on 2019-11-21
Words 130 and Reading Time 1 Minutes
Viewed Times

1、centos系统的内核必须高于3.10
uname -r

2、yum 包更新到最新
yum update

3、卸载旧版本(如果安装过旧版本的话)
yum remove docker docker-common docker-selinux docker-engine

4、安装需要的软件包
yum install -y yum-utils device-mapper-persistent-data lvm2

5、设置yum源
yum-config-manager —add-repo https://download.docker.com/linux/centos/docker-ce.repo

6、安装最新版本的Docker
yum install docker-ce docker-ce-cli containerd.io

7、启动Docker并设置开机启动
systemctl start docker
systemctl enable docker

8、重启daemon并重启docker服务
systemctl daemon-reload
systemctl restart docker


本文为作者原创文章,未经作者允许不得转载。

...

...

00:00
00:00