错误:Got permission denied while trying to connect to the Docker daemon socket at....
用JSch实现远程执行docker命令报错: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/containers/nova-627e13b3-0
·
用JSch实现远程执行docker命令报错:
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/containers/nova-627e13b3-06b0-49e6-8cb9-8b649a9a8c93/exec: dial unix /var/run/docker.sock: connect: perm
我就奇了怪了,我在物理机上执行:docker exec nova-627e13b3-06b0-49e6-8cb9-8b649a9a8c93 ls
没有任何错误,粘贴到eclipse上就出现了错误
错误原因:没有加sudo,原来JSch连接进去 我的用户不是root 没办法执行,
在开始的命令改为:sudo docker exec nova-627e13b3-06b0-49e6-8cb9-8b649a9a8c93 ls
错误解决。
更多推荐
已为社区贡献2条内容
所有评论(0)