Where to add registries certificates with rootless docker

I have some private docker registries and I added their certificates in /etc/docker/certs.d/[domain.name.com]/ca.crt and it’s working but my problem is that I have to use sudo with docker even if I am in the docker group and rebooting (multiple tries).

So I gave a try to rootless docker but now it seems that I can’t connect anymore to my registries, I’m having this error: Error response from daemon: Get https://domain.name.com/v2/: x509: certificate signed by unknown authority

I added the same folders in certs.d under my /home/$USER/.docker/certs.d/... folder but it doesn’t work neither.

Do you know if there is something to do with the certificates with rootless docker ?

Thank you so much for the answers

On Linux, try ~/.config/docker/certs.d/ for rootless instead of the usual /etc/docker/certs.d/

At least that works for me on Ubuntu 20.04.