M
M
maxim_kad2020-05-12 17:16:41
Docker
maxim_kad, 2020-05-12 17:16:41

How to use certificates to access the registry?

After updating Docker for Windows on 05/11/2020, certificates for authorization in the private registry stopped working.
Previously, the `C:\Program Files\Docker\Docker\resources\MobyLinux` file was modified for normal work with certificates, but after the update it no longer exists and everything stopped working.
Everything that is written in off. manuals didn't help. Please help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maxim_kad, 2020-05-20
@maxim_kad

I found the solution in an issue from 2018.
Here is the solution itself:

We put the certificates in the folder C:\ProgramData\Docker\certs.d\docker.nalogka.com, the files should turn out:
C:\ProgramData\Docker\certs.d\docker.nalogka.com\client.cert
C:\ProgramData\Docker\certs.d\docker.nalogka.com\client.key

Run the command
docker run --rm --privileged -d -v /:/host -v C:\ProgramData\docker\certs.d:/certs.d alpine cp -r /certs.d /host/etc/docker/certs.d

D
Dmitry, 2020-05-13
@q2digger

Never worked with Docker for Windows, but the official manual at https://docs.docker.com/docker-for-windows/ literally says this:


How do I add client certificates?
You can add your client certificates in ~/.docker/certs.d/:/client.cert and ~/.docker/certs.d/:/client.key. You do not need to push your certificates with git commands.
When the Docker Desktop application starts, it copies the ~/.docker/certs.d folder on your Windows system to the /etc/docker/certs.d directory on Moby (the Docker Desktop virtual machine running on Hyper-V).

Have you tried placing your certificate in one of the specified stores?
And after googling, there was also this topic:
https://github.com/docker/for-win/issues/2231

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question