keyle_xiao 查看docker版本号: [root@iZky7h4oc7uZ workingcopy_blog]# docker version Client: Version: 1.13.1 API version: 1.26 Package version: Go version: go1.10.3 Git commit: 7d71120/1.13.1 Built: Wed Mar 20 16:04:34 2024 OS/Arch: linux/amd64 Server: Version: 26.1.4 API version: 1.45 (minimum version 1.24) Package version: Go version: go1.21.11 Git commit: de5c9cf Built: Wed Jun 5 11:29:25 2024 OS/Arch: linux/amd64 Experimental: false
keyle_xiao 设置开机自启动 systemctl enable docker.service [root@iZkh4oconc7uZ workingcopy_blog]# systemctl enable docker.service Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
keyle_xiao 1、删除之前安装的docker yum remove docker docker-common docker-selinux docker-engine 2、安装一些依赖 yum install -y yum-utils device-mapper-persistent-data lvm2 wget 3、配置docker的安装源 wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo 4、将安装源替换成清华源 sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo 5、安装 yum makecache fast yum install docker-ce