I have boot2docker 1.4.1 running on windows via virtualbox. I am behind a proxy that MITMs https certificates. I configured proxy by adding the following lines in /var/lib/boot2docker/profile
:
export HTTP_PROXY=<proxyhost>:80
export HTTPS_PROXY=<proxyhost>:80
DOCKER_TLS=no
EXTRA_ARGS="--insecure-registry index.docker.io"
however when I run docker@boot2docker:~$ docker run hello-world
I get
Unable to find image 'hello-world:latest' locally
Pulling repository hello-world
FATA[0006] Get https://index.docker.io/v1/repositories/library/hello-world/images
: x509: certificate signed by unknown authority
Please help me figure out the correct way to ignore certificate errors. Thanks!
You can tell Chrome to ignore all SSL certificate errors by passing the following at the command line at launch. If you're on Windows simply right-click into the properties of the launcher. Then add --ignore-certificate-errors in the target field. Then restart Chrome.
How to resolve Docker x509: certificate signed by unknown authority error. In order to resolve this error, we have to import the CA certificate in use by the ICP into the system keystore. Then, we have to restart the Docker client for the changes to take effect.
If you have Docker for Windows on Windows 10, and you're getting the "x509: certificate signed by unknown authority" error, you can try this:
Edit Looks like the new docker only works on certain flavors of Windows 10. If you are still stuck on Windows 7, I have updated the below to reflect the steps I had to go through to correct the 'self signed certificate in certificate chain' error when I installed the latest version of docker-toolbox (Docker 1.11.2).
Finally got this working on Windows 7 following the answers here: https://github.com/boot2docker/boot2docker/issues/347
Check that this is your issue by running openssl s_client -showcerts:
docker@boot2docker:~$ openssl s_client -showcerts -CApath . -connect index.docker.io:443
(Edit: removed 32 from -showcerts and corrected host name)
In the certificate chain, you'll see the proxy has inserted itself and the verify returns an error something like this
Verify return code: 19 (self signed certificate in certificate chain)
If you have the same problem then give the steps below a try :
docker@boot2docker:~$ sudo mkdir /var/lib/boot2docker/certs/
docker@boot2docker:~$ sudo cp /c/Users/<username>/<folder>/<proxy-cert>.pem /var/lib/boot2docker/certs/
/var/lib/boot2docker/bootlocal.sh
and include the source from https://gist.github.com/irgeek/afb2e05775fff532f960 (I just created the file in Windows using Notepad++ and copied it to the correct location similar to the above step)C:\>docker-machine restart
docker-machine ssh
and verify the changes worked: docker run hello-world
You should see output which contains something like:
Hello from Docker.
This message shows that your installation appears to be working correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With