The docker documentation here describes how to configure docker in order to connect to a registry that requires a client certificate. Under Ubuntu it works: I place the client.crt
and client.key
files into the folder /etc/docker/certs.d/<myregistry>/
as stated by the documentation ... and it works.
Unfortunately, there is no specific documentation how to configure docker under windows (wsl backend) to achieve the same result... and I stuck... I performed following attempts:
docker-desktop
wsl file system in /etc/docker/certs.d/<myregistry>/
, restarted docker...docker-desktop-data
wsl file system in /etc/docker/certs.d/<myregistry>/
, restarted dockerdocker-desktop
wsl file system in /root/.docker/certs.d/<myregistry>/
, restarted dockerdocker-desktop-data
wsl file system in /root/.docker/certs.d/<myregistry>/
, restarted dockerI always get the same result:
PS C:\> docker login -u <remote_user> <myregistry>
Password:
Error response from daemon: login attempt to https://<myregistry>/v2/ failed with status: 400 Bad Request
Any Idea?
I found it! You need to place the cert and key files into the C:\Users\<user>\.docker\certs.d\<mysite>\
as follows:
C:\Users\<user>\.docker\certs.d\<mysite>\client.cert
C:\Users\<user>\.docker\certs.d\<mysite>\client.key
Docker must be restarted and after that, the login with the command docker login <mysite>
does not fail anymore.