centos7.5 安装docker
2020-05-28 本文已影响0人
码二哥
1. 安装依赖
yum install -y yum-utils device-mapper-persistent-data lvm2

2. 设置docker yum源
yum-config-manager --add-repo [http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo](http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo)

3. 可以查看所有仓库中所有docker版本,并选择特定版本安装
yum list docker-ce --showduplicates | sort -r

4. 选择指定的版本安装docker
如:
yum install -y docker-ce-18.06.0.ce

5. 设置开机启动
systemctl start docker
systemctl enable docker
6. 更新docker 镜像源
vi /etc/docker/daemon.json
{
"registry-mirrors": ["http://hub-mirror.c.163.com"],
"insecure-registries": ["10.211.55.9:80"]
}
insecure-registries,配置harbor时用到的
7. docker的版本
