FROM alpine

RUN apk -U add openjdk8 curl openssl

RUN echo -e "$(curl -sSL https://www.amazontrust.com/repository/AmazonRootCA1.pem)\n \
$(curl -sSL https://www.amazontrust.com/repository/AmazonRootCA2.pem)\n \
$(curl -sSL https://www.amazontrust.com/repository/AmazonRootCA3.pem)\n \
$(curl -sSL https://www.amazontrust.com/repository/AmazonRootCA4.pem)\n \
$(curl -sSL https://www.amazontrust.com/repository/SFSRootCAG2.pem)" \
> trustStore.pem \
&& cat trustStore.pem | keytool -import -alias firstCA -storepass 123456 -noprompt -keystore trustStore.jks
