"PKIX path building failed" and "unable to find valid certification path to requested target" when added in Dockerfile

106 Views Asked by At

First zero of serial number of certificate is omitted when added to cacerts file and "PKIX path building failed" and "unable to find valid certification path to requested target" error is thrown when request send to the ms.

This is my command for adding certs to cacerts in Dockerfile.

RUN keytool -importcert -alias auth -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -file auth.cer -noprompt && rm -f auth.cer

I want to know if there is way to prevent this form happening or alternative way to add certificate in Dockerfile.

0

There are 0 best solutions below