docker: Get https://registry-1.docker.io/v2/: x509: certificate is valid for *.xenahubs.net, not registry-1.docker.io.

下面的命令:

docker run -itd --name test01 ubuntu

报错:

解决方法:

在 /etc/docker/daemon.json 加入下面的配置:

[root@node01 docker]# cat daemon.json
{"debug":true,"registry-mirrors": ["http://hub-mirror.c.163.com"],"insecure-registries":["registry-1.docker.io"]}

主要是:"debug":true 和  "insecure-registries":["registry-1.docker.io"] 这两个配置。

"registry-mirrors": ["http://hub-mirror.c.163.com"] 是使用国内网易的镜像进行加速。

猜你喜欢

转载自www.cnblogs.com/digdeep/p/12236637.html
今日推荐