centos7.8 docker安装

1.#安装依赖

yum install -y yum-utils device-mapper-persistent-data lvm2

2.#配置yum源 使用国内的

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

3.#查看版本

yum list docker-ce --showduplicates | sort -r

4.选择其中一个 进行安装docker

yum -y install docker-ce-20.10.10-3.el7

5.查看docker版本     docker -v

6.启动docker    systemctl start docker

7.查看docker 启动状态  systemctl status docker

8.修改镜像仓库  vim /etc/docker/daemon.json

#改为下面内容,然后重启docker
{
"debug":true,"experimental":true,
"registry-mirrors":["https://pb5bklzr.mirror.aliyuncs.com","https://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"]
}

9.

启动使用Docker
systemctl start docker     #运行Docker守护进程
systemctl stop docker      #停止Docker守护进程
systemctl restart docker   #重启Docker守护进程

10.

 11.查看信息 docker info  

注意:不使用1.13.1版本,该版本在jenkins使用docker命令时会说找不到配置文件!

猜你喜欢

转载自blog.csdn.net/wnn654321/article/details/121548174