用户名:root 密码:12345678
命令:
yum install docker -y(安装 docker)
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
systemctl enable docker
systemctl start docker
如果yum install docker-ce docker-ce-cli containerd.io不好用,先卸载再安装 yum remove docker* -y然后重新yum install docker-ce docker-ce-cli containerd.io,最后使用systemctl start docker
和systemctl status docker查看状态是否是active