Docker在更新到v1.7.0后抱怨无效证书 [英] Docker complains about invalid certificate after update to v1.7.0

查看:369
本文介绍了Docker在更新到v1.7.0后抱怨无效证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到Docker v1.7.0(以及boot2docker)后,运行 docker ps 时会出现以下错误:

  x509:证书适用于127.0.0.1,10.0.2.15,而不是192.168.59.103 

这是这个版本的已知问题,我可以做些什么来解决这个问题?

解决方案

这是boot2docker 1.7.0版本中引入的已知问题: https://github.com/boot2docker / boot2docker / issues / 824



更新到boot2docker 1.7.1



更新到 boot2docker 1.7.1 修复了此问题,如这里



boot2docker 1.7.0的选项



它似乎与boo期间网络接口的出现有关吨。以下选项可用于修复此问题。



选项1



修复程序是运行以下序列,其中添加了等待所有网络接口存在的代码:

  boot2docker ssh 
sudo curl -o / var / lib / boot2docker / profile https://gist.githubusercontent.com/garthk/d5a17007c277aa5c76de/raw/3d09c77aae38b4f2809d504784965f5a16f2de4c/profile
sudo halt
boot2docker up

来源(以及下载的代码的更多详细信息): https ://gist.github.com/garthk/d5a17007c277aa5c76de



这已经解决了我的问题,虽然我不得不停止 boot2docker- vm 通过VirtualBox UI获得一个干净的开始。



Gist将以下内容添加到 .profile 文件在boot2docker VM中:

  wait4eth1(){
CNT = 0
直到ip a笑w eth1 | grep -q UP
do
[$((CNT ++))-gt 60]&&打破||睡眠1
完成
睡眠1
}
wait4eth1

此功能等待1分钟,以便 eth1 界面出现。



选项2



另一个选择似乎是要做

  boot2docker delete 
boot2docker init
boot2docker up

这将破坏boot2docker VM - 您可能会丢失所做的任何自定义设置。


After updating to Docker v1.7.0 (and also boot2docker), I'm getting the following error when running docker ps:

x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

Is this a known issue with this version, and what can I do to fix this?

解决方案

This is a known issue introduced in version 1.7.0 of boot2docker: https://github.com/boot2docker/boot2docker/issues/824

Update to boot2docker 1.7.1

Updating to boot2docker 1.7.1 fixes this issue, as described here.

Options for boot2docker 1.7.0

It seems to be related to the way the network interfaces are coming up during boot. The following options can be used to fix this.

Option 1

The fix is to run the following sequence, which adds code to wait for all network interfaces to be present:

boot2docker ssh
sudo curl -o /var/lib/boot2docker/profile https://gist.githubusercontent.com/garthk/d5a17007c277aa5c76de/raw/3d09c77aae38b4f2809d504784965f5a16f2de4c/profile
sudo halt
boot2docker up

Source (and more details on the code that is downloaded): https://gist.github.com/garthk/d5a17007c277aa5c76de

This has fixed the issue for me, although I had to stop the boot2docker-vm through the VirtualBox UI to get a clean start.

The Gist adds the following to the .profile file in the boot2docker VM:

wait4eth1() {
        CNT=0
        until ip a show eth1 | grep -q UP
        do
                [ $((CNT++)) -gt 60 ] && break || sleep 1
        done
        sleep 1
}
wait4eth1

This function waits up to 1 minute for the eth1 interface to come up.

Option 2

Another option seems to be to do

boot2docker delete
boot2docker init
boot2docker up

This will destroy the boot2docker VM - you might lose any customizations you have done.

这篇关于Docker在更新到v1.7.0后抱怨无效证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆