From Ubuntu running in WSL2, I'm attempting to push a docker image to a private docker registry. It fails with the following error:
Get "https://docker.example.com/v2/": x509: certificate signed by unknown authority
I'm using Docker Desktop with the WSL2 integration enabled.
Where do I install the root CA certificate so that docker can find it? I've tried the following:
- Installing it in the Trusted Root Certification Authority store in Windows and restarting Docker Desktop Service.
- Installing it in the Ubuntu CA store.
Neither of these works.
The CA certificate should be placed in the directory
C:\ProgramData\docker\certs.d\. Then restart the docker service withrestart-service dockerfrom an admin powershell.