FATA[0000] Get http:///var/run/docker.sock/v1.18/images/json: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
问题原因: 非 root 用户未成功添加到用户组或未生效
解决方法:
1 2 3 4 5 6 7 8
# 创建 docker 用户组 sudo groupadd docker # 添加用户到用户组 sudo gpasswd -a ${USER} docker # 重启服务 sudo service docker restart # 切换当前会话到新 group 或者重启 X 会话 [必须步骤] newgrp - docker 或 pkill X
containerd 版本依赖问题
redhat 直接安装 docker-ce 会显示 containerd-io 版本依赖不满足
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[root@fdm ~]# dnf install docker-ce -y Last metadata expiration check: 0:09:30 ago on Tue 26 May 2020 11:03:38 AM CST. Error: Problem: package docker-ce-3:19.03.9-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed - conflicting requests - package containerd.io-1.2.10-3.2.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.13-3.1.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.13-3.2.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.2-3.3.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.2-3.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.4-3.1.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.5-3.1.el7.x86_64 is filtered out by modular filtering - package containerd.io-1.2.6-3.3.el7.x86_64 is filtered out by modular filtering (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
问题:Segmentation Fault or Critical Error encountered
提示: Segmentation Fault or Critical Error encountered. Dumping core and aborting. Aborted 解答: 安装错误安装 docker 了,应该安装 docker-io
问题:docker-io-1.7.1-2.el6.x86_64
提示: Transaction Check Error: file /usr/bin/docker from install of docker-io-1.7.1-2.el6.x86_64 conflicts with file from package docker-1.5-5.el6.x86_64 解答: 这个是因为先装了 docker,再装 docker-io 后的结果,解决方法是 yum remove docker 后再 yum install docker-io 即可。
问题:/var/run/docker.sock: no such file or directory
1 2 3 4 5 6 7 8
# 错误日志 Get http:///var/run/docker.sock/v1.19/images/search?term=centos: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a ?
# 问题原因 解答: docker 没有启动,
# 解决方法 /etc/init.d/docker start
问题: 容器内中文乱码
1 2 3 4
[root@c7c57188b482 test_data]# ll total 4 drwxrwxrwx 5 root root 4096 Oct 15 02:58 graph_data -rwxr-xr-x 1 root root 0 Oct 15 02:58 ????????????
(env) [scfan@fdm docker_cmd]$ docker import docker_7.tar docker_7 Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.26/images/create?fromSrc=-&message=&repo=docker_7&tag=: dial unix /var/run/docker.sock: connect: permission denied (env) [scfan@fdm docker_cmd]$ sudo chmod 777 /var/run/docker.sock
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused “exec: "/usr/sbin/init": stat /usr/sbin/init: no such file or directory”: unknown