File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,7 @@ RUN apk add --no-cache \
1111RUN addgroup -S kafkaui && adduser -S kafkaui -G kafkaui
1212
1313# creating folder for dynamic config usage (certificates uploads, etc)
14- RUN mkdir -p /etc/kafkaui/certs
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
22-
14+ RUN mkdir /etc/kafkaui/
2315RUN chown kafkaui /etc/kafkaui
2416
2517USER kafkaui
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ CERT_DIR=" /etc/kafkaui/certs"
4+ KEYSTORE=" $JAVA_HOME /lib/security/cacerts"
5+ STOREPASS=" changeit"
6+
7+ if [ -d " $CERT_DIR " ]; then
8+ for cert in $CERT_DIR /* .crt; do
9+ if [ -f " $cert " ]; then
10+ alias=$( basename " $cert " .crt)
11+ echo " Importing $cert with alias $alias "
12+ keytool -import -noprompt -trustcacerts -alias " $alias " -file " $cert " -keystore " $KEYSTORE " -storepass " $STOREPASS "
13+ fi
14+ done
15+ else
16+ echo " No certificates directory found at $CERT_DIR "
17+ fi
18+
You can’t perform that action at this time.
0 commit comments