测试环境
Centos7_x86_64
1 | [root@localhost ~]# uname -a |
增加yum源
1 | [root@localhost ~]# sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' |
文件冲突
Transaction check error:
file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
解决方法:
先安装lvm2
1 | [root@localhost ~]# sudo yum install lvm2 -y |
Docker daemon未运行
[root@localhost ~]# docker pull ubuntu
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon. Is the docker daemon running on this host?解决方法:
重启docker服务
1 | [root@localhost ~]# service docker restart |
Docker被墙
[root@localhost ~]# docker pull centos
Using default tag: latest
Pulling repository docker.io/library/centos
Error while pulling image: Get https://index.docker.io/v1/repositories/library/centos/images: dial tcp: lookup index.docker.io on 10.28.10.166:53: no such host
由于docker镜像站被墙,推荐使用灵雀云镜像解决方法:
pull的时候使用国内镜像地址
1 | [root@localhost ~]# docker pull index.alauda.cn/tutum/centos |
观点仅代表自己,期待你的留言。