docker search mysql Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?


1.docker search mysql 报错

[root@localhost usr]# docker search mysql
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

解决:
进入/etc/docker

查看有没有 daemon.json。这是docker默认的配置文件。

 

如果没有新建,如果有,则修改。

[root@localhost docker]# vi daemon.json

{

“registry-mirrors”:
[“https://registry.docker-cn.com”]

}

保存退出。

查看:

[root@localhost docker]# cat daemon.json

重启docker服务

service docker restart


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM