How to add a SSL self-signed cert to Jenkins for LDAPS within Dockerfile?

前端 未结 3 2108
再見小時候
再見小時候 2020-12-09 11:05

I want to enable LDAPS under security in Jenkins but my LDAP server has a self-signed CERT. Has anyone done this or have some pointers on doing this? Do I have to use keytoo

3条回答
  •  难免孤独
    2020-12-09 11:32

    It turns out I just need to add this in the Dockerfile where ldap.cer is the cert chain for my self-signed cert.

    COPY ldap.cer $JAVA_HOME/jre/lib/security
    RUN \
        cd $JAVA_HOME/jre/lib/security \
        && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ldapcert -file ldap.cer
    

提交回复
热议问题