samrocketman/my_internal_ca

Use der format for intermediate keystore certs

Closed this issue · 0 comments

ref: https://github.com/jenkinsci/docker-jnlp-slave/issues/17

USER root
ADD lets-encrypt.der .
RUN keytool -importcert -alias local-CA \
  -keystore /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security/cacerts \
  -file lets-encrypt.der \
  -storepass changeit
USER jenkins

ENTRYPOINT ["jenkins-slave"]

Note that you probably have your self signed cert in pem format, and java needs it in der format, so something like openssl x509 -outform der -in certificate.pem -out certificate.der may come in handy