How to install a paid SSL (Comodo or Sectigo) to Harbor: Private Docker Registry?

317 views Asked by At

I was trying to install Harbor: Private Docker Registry with Paid SSL from Sectigo(Comodo).

But when I install, I can see it was successful in web page, but not in docker login.

When I tried to docker login ~~~, then it says
Error response from daemon: Get https://docker.siadev.kr/v2/: x509: certificate signed by unknown authority

What I received from SSL provider are these.
{domain}.crt, {domain}.key, AAACertificateServices.crt, AddTrustExternalCARoot.crt, COMODORSAAddTrustCA.crt, COMODORSADomainValidationSecureServerCA.crt, SectigoRSAAddTrustCA.crt, SectigoRSADomainValidationSecureServerCA.crt, rsa-dv.chain-bundle.pem

And docker says it supports ca.crt, {domain}.cert, {domain}.key.

What crt files do I have to concat?


I placed those like,

/etc/docker/certs.d/{domain}/{domain}.cert
/etc/docker/certs.d/{domain}/{domain}.key
/etc/docker/certs.d/{domain}/ca.crt
.

If I try to login with ip or another domain, then it says Error response from daemon: Get https://{domain}/v2/: x509: certificate is valid for {domain}, not {fake_domain}.

So I assume that they are in the right place, and the problem is from wrong combine of ca.crt.

1

There are 1 answers

0
Inc0 On

I'm not sure it's going to solve your problem but I think you should put your certificate in

/etc/docker/certs.d/$MY_REGISTR_DOMAIN:REGISTR_PORT/

folder. That's where I placed mine (they are self signed) and it works.