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