yum安装docker-ce
[root@jenkins-server ~]# wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo [root@jenkins-server ~]# yum -y install docker-ce [root@jenkins-server ~]# systemctl start docker [root@jenkins-server ~]# systemctl enable docker [root@jenkins-server ~]# docker -v Docker version 20.10.1, build 831ebea # vim /usr/lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock 把上述行时行修改,修改如下: ExecStart=/usr/bin/dockerd # cat > /etc/docker/daemon.json <<EOF { "registry-mirrors": ["https://mirror.ccs.tencentyun.com"], "insecure-registries": ["ccr.ccs.tencentyun.com"], } EOF [root@jenkins-server ~]# systemctl daemon-reload [root@jenkins-server ~]# systemctl restart docker