I have a windows 10 and I installed the WSL ubuntu 18.04 inside. Since the WSL can't use the docker due to virtualization, i ends up use my DigitalOcean droplet as my docker machine target. I follow the guide of setting up the docker machine here: https://www.kevinkuszyk.com/2016/11/28/connect-your-docker-client-to-a-remote-docker-host/ to setup the docker machine for both my Windows 10 and my uBuntu WSL.

The problem is, it can only work in either one for some reason. So if i setup the docker machine in my windows 10, then i try to setup the docker machine with same configuration in WSL, the windows no longer able to use the docker machine setup, and vice versa.

This is the error with the docker machine trying to dock to my remote server:

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "???.???.???.???:????": x509: certificate signed by unknown authority You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'. Be advised that this will trigger a Docker daemon restart which might stop running containers.

Any idea on how to make it work for both my windows power shell and ubuntu wsl?


docker-machine create will replace the certificates that is exists previously, thus the moment the previous certificate is being invalidated, we can't connect to the docker. The way to overcome this is by generating in either windows or WSL, then go to the user folder ~/.docker/machine and copy all to the other operating system. need to go into each machine and reconfigure the config.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.