Skip to content

Commit 2a1fcdf

Browse files
committed
feat: Add support for custom root certificates in Java keystore
1 parent e016869 commit 2a1fcdf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

api/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ RUN addgroup -S kafkaui && adduser -S kafkaui -G kafkaui
1212

1313
# creating folder for dynamic config usage (certificates uploads, etc)
1414
RUN mkdir -p /etc/kafkaui/certs
15-
RUN for cert in /etc/kafkaui/certs/*.crt; do \
16-
keytool -import -noprompt -trustcacerts -alias $(basename $cert .crt) -file $cert -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit; \
17-
done
15+
RUN if ls /etc/kafkaui/certs/*.crt 1> /dev/null 2>&1; then \
16+
for cert in /etc/kafkaui/certs/*.crt; do \
17+
keytool -import -noprompt -trustcacerts -alias $(basename $cert .crt) -file $cert -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit; \
18+
done \
19+
else \
20+
echo "No certificates found in /etc/kafkaui/certs/"; \
21+
fi
1822

1923
RUN chown kafkaui /etc/kafkaui
2024

0 commit comments

Comments
 (0)