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