我用的是openEuler,所以直接yum安装(推荐,因为二进制安装,docker命令中补全操作要另外安装软件)
[root@localhost ~]# yum -y install docker-ce #安装的是默认最新版本
- [root@localhost ~]# mkdir -p /etc/docker
- [root@localhost ~]# sudo tee /etc/docker/daemon.json <<-'EOF'
- {
- "registry-mirrors": ["https://registry.docker-cn.com"]
- }
- EOF
这个是免费的而且有操作帮助,个人感觉还挺快
- [root@localhost~]# systemctl daemon-reload
- [root@localhost~]# systemctl start docker.service
- [root@localhost~]# systemctl enable docker.service
[root@localhost ~]# docker version