Skip to content

Simplify keytool cert import loop in api/Dockerfile - #179

Draft
dk1844 with Copilot wants to merge 3 commits into
masterfrom
copilot/optimize-certificate-import
Draft

Simplify keytool cert import loop in api/Dockerfile#179
dk1844 with Copilot wants to merge 3 commits into
masterfrom
copilot/optimize-certificate-import

Conversation

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Overview

The certificate import step in api/Dockerfile used echo yes | to bypass keytool's interactive confirmation and pointed at an explicit $JAVA_HOME cacerts path with a randomized alias, adding unnecessary overhead to the build.

  • Dockerfile import loop: Replaced -keystore $JAVA_HOME/lib/security/cacerts with -cacerts (JVM default trust store), replaced echo yes | piping with -noprompt, and replaced -alias ldaps$RANDOM with -alias $file for deterministic aliasing.
RUN for file in `ls /opt/certs/*.pem`; \
do \
    keytool -import -file $file -alias $file -cacerts -storepass changeit -noprompt; \
done

Release Notes

  • Simplified and sped up the LDAP certificate import step in api/Dockerfile

Related

Co-authored-by: dk1844 <4457378+dk1844@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize certificate import step in Dockerfile Simplify keytool cert import loop in api/Dockerfile Sep 2, 2026
Copilot AI requested a review from dk1844 September 2, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants