Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 4f0efb0

Browse files
authored
fix: handle too ca files (#57)
1 parent f9a8971 commit 4f0efb0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

images/base/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ RUN mkdir /helper-scripts \
3232
&& mkdir -p $USER_TMP_DIR \
3333
&& mkdir -p $RUNNER_HOME \
3434
&& mkdir -p $HOME/.ansible \
35-
&& mkdir -p /run/user/$USERID
35+
&& mkdir -p /run/user/$USERID \
36+
&& mkdir -p /etc/ssl/certs/custom
3637

3738
# Copy image helper scripts
3839
ADD ./helper-scripts/ /helper-scripts/

images/base/helper-scripts/detect-setup.sh

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
CA_FILE="/etc/ssl/certs/ca-certificates.crt"
4+
CUSTOM_CA_FILE="/etc/ssl/certs/custom/ca-certificates.crt"
45

56
importCertOldJava () {
67
alias=$(openssl x509 -noout -subject -in "$1" | awk -F= '{print $NF}' | sed -e 's/^[ \t]*//' | sed -e 's/ /_/g')
@@ -14,6 +15,11 @@ importCertNewJava () {
1415
keytool -importcert -alias $alias -cacerts -storepass changeit -file $1 -noprompt -trustcacerts
1516
}
1617

18+
# merge custom ca file
19+
if [ -f "$CA_FILE" ]; then
20+
cat $CUSTOM_CA_FILE >> $CA_FILE
21+
fi
22+
1723
# yarn
1824
if command -v yarn -v &> /dev/null; then
1925
echo ""

0 commit comments

Comments
 (0)