Created
July 6, 2018 21:00
-
-
Save efenderbosch/920e3348a6be9970714e0a0dbed3e99a to your computer and use it in GitHub Desktop.
Installing AWS CAs in Java 10 with Centos 7
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
FROM centos:7 | |
RUN cd /tmp && \ | |
curl "https://download.java.net/java/GA/jdk10/10.0.1/fb4372174a714e6b8c52526dc134031e/10/openjdk-10.0.1_linux-x64_bin.tar.gz" -o "openjdk-10_bin.tar.gz" -s && \ | |
tar xzf openjdk-10_bin.tar.gz && \ | |
mv jdk-10.0.1 /usr/local/jdk-10 && \ | |
rm /usr/local/jdk-10/lib/src.zip && \ | |
alternatives --install /usr/bin/java java /usr/local/jdk-10/bin/java 1 && \ | |
alternatives --install /usr/bin/javac javac /usr/local/jdk-10/bin/javac 1 && \ | |
alternatives --install /usr/bin/keytool keytool /usr/local/jdk-10/bin/keytool 1 && \ | |
alternatives --auto java && \ | |
rm openjdk-10_bin.tar.gz | |
RUN cd /tmp && \ | |
curl "https://www.amazontrust.com/repository/AmazonRootCA1.cer" -o "AmazonRootCA1.cer" -s && \ | |
curl "https://www.amazontrust.com/repository/AmazonRootCA2.cer" -o "AmazonRootCA2.cer" -s && \ | |
curl "https://www.amazontrust.com/repository/AmazonRootCA3.cer" -o "AmazonRootCA3.cer" -s && \ | |
curl "https://www.amazontrust.com/repository/AmazonRootCA4.cer" -o "AmazonRootCA4.cer" -s && \ | |
curl "https://www.amazontrust.com/repository/SFSRootCAG2.cer" -o "SFSRootCAG2.cer" -s && \ | |
keytool -importcert -noprompt -alias AmazonRootCA1 -cacerts -file /tmp/AmazonRootCA1.cer -storepass changeit && \ | |
keytool -importcert -noprompt -alias AmazonRootCA2 -cacerts -file /tmp/AmazonRootCA2.cer -storepass changeit && \ | |
keytool -importcert -noprompt -alias AmazonRootCA3 -cacerts -file /tmp/AmazonRootCA3.cer -storepass changeit && \ | |
keytool -importcert -noprompt -alias AmazonRootCA4 -cacerts -file /tmp/AmazonRootCA4.cer -storepass changeit && \ | |
keytool -importcert -noprompt -alias SFSRootCAG2 -cacerts -file /tmp/SFSRootCAG2.cer -storepass changeit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment