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