Created
March 15, 2016 13:40
-
-
Save wrouesnel/6240468b75c6d72053ed to your computer and use it in GitHub Desktop.
Updating system SSL and java keystore in a docker build
This file contains hidden or 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
LMAO