docker容器报x509:certificate signed by unknown authority错误

在执行docker search,docker pull命令时,我遇到的报错信息

Error response from daemon: Get "https://registry-1.docker.io/v2/": x509: certificate signed by unknown authority

本质是识别来自外部 https 的数字证书的问题,可尝试下载ssl证书上传到服务器解决,参考另一篇博客下载ssl证书

https://www.cnblogs.com/jinci2022/p/16808865.html

若添加ssl证书到服务器更新证书后仍无法解决docker报错的问题,可尝试修改docker配置文件,在/etc/docker/daemon.json下配置

{
   "registry-mirrors": ["https://8f6a79wk.mirror.aliyuncs.com"],
   "insecure-registries":["https://8f6a79wk.mirror.aliyuncs.com","https://registry-1.docker.io"]
}

使用阿里的镜像,并将报错信息中的https://registry-1.docker.io网站添加到insecure-registries中,保存重启docker.

posted @ 2022-10-20 11:12  锦此  阅读(1562)  评论(0编辑  收藏  举报