Boot2docker reported this x509 exception when executing the docker command

  docker, question

An error occurred trying to connect: Gethttps:// x509: certificate is valid for,, not

I checked the solution given by others, which is to execute boot2docker delete and reinitialize.
In that way, all the images I downloaded will be gone, and all the work will have to be done again.
Does anyone have other solutions?

Run firstboot2docker sshInto the virtual machine
runsudo vi /var/lib/boot2docker/profileAdd the following:

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

runexitAfter exiting the virtual machine, runboot2docker stopShut down the virtual machine and turn it back on.

Remember to run the docker command when opening the new terminal.eval "$(boot2docker shellinit)"