-
-
Save jforge/5ccf7b0ea13b8b0bd8b0e663bd41b70d to your computer and use it in GitHub Desktop.
Updating system SSL and java keystore in a docker build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compile and install certificates for the Java trust keystore | |
# and main keystore. Let's face it, this is everyone's keystore password. | |
# Note I install java very flatly normally. | |
COPY trust-certs/ /usr/local/share/ca-certificates/ | |
RUN update-ca-certificates && \ | |
ls -1 /usr/local/share/ca-certificates | while read cert; do \ | |
openssl x509 -outform der -in /usr/local/share/ca-certificates/$cert -out $cert.der; \ | |
/java/bin/keytool -import -alias $cert -keystore /java/jre/lib/security/cacerts -trustcacerts -file $cert.der -storepass changeit -noprompt; \ | |
rm $cert.der; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment