From 170529c2900bc4481bd6402435cea3581554cdde Mon Sep 17 00:00:00 2001 From: hamc17 Date: Fri, 26 Jun 2026 11:09:29 +0200 Subject: [PATCH 1/4] Revert to original command, suppress errors --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5febd26..4cdd111 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,8 @@ RUN \ echo "######################################################" && \ echo "### Import trusted certs before doing anything else ###" && \ echo "######################################################" && \ - find /opt/certs -type f \( -name "*.pem" -o -name "*.crt" \) -exec cat {} + >> /etc/pki/tls/certs/ca-bundle.crt && \ + for FILE in `ls /opt/certs/*.pem /opt/certs/*.crt 2>/dev/null`; \ + do cat $FILE >> /etc/pki/tls/certs/ca-bundle.crt ; done && \ echo "###############################################" && \ echo "### Install ###" && \ echo "### -> Basics ###" && \ From eea0e0a9b55713f588f2da0fae68dd56df366cf1 Mon Sep 17 00:00:00 2001 From: hamc17 Date: Fri, 26 Jun 2026 11:26:38 +0200 Subject: [PATCH 2/4] Updated based on suggestion --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4cdd111..bb1f8e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,8 +32,10 @@ RUN \ echo "######################################################" && \ echo "### Import trusted certs before doing anything else ###" && \ echo "######################################################" && \ - for FILE in `ls /opt/certs/*.pem /opt/certs/*.crt 2>/dev/null`; \ - do cat $FILE >> /etc/pki/tls/certs/ca-bundle.crt ; done && \ + for FILE in `ls /opt/certs/*.pem /opt/certs/*.crt`; \ + do [ -e "$FILE" ] || continue; \ + cat "$FILE" >> /etc/pki/tls/certs/ca-bundle.crt; \ + done && \ echo "###############################################" && \ echo "### Install ###" && \ echo "### -> Basics ###" && \ From 71ea4addca6d3ff40fbb22909bbda3f4131e6d06 Mon Sep 17 00:00:00 2001 From: hamc17 Date: Fri, 26 Jun 2026 11:58:01 +0200 Subject: [PATCH 3/4] Skip errors if glob doesn't match --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb1f8e2..1b322e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,9 +32,8 @@ RUN \ echo "######################################################" && \ echo "### Import trusted certs before doing anything else ###" && \ echo "######################################################" && \ - for FILE in `ls /opt/certs/*.pem /opt/certs/*.crt`; \ - do [ -e "$FILE" ] || continue; \ - cat "$FILE" >> /etc/pki/tls/certs/ca-bundle.crt; \ + for CERT_PATH in "/opt/certs/"*.pem "/opt/certs/"*.crt; \ + do [ -e "$CERT_PATH" ] && cat "$CERT_PATH" >> /etc/pki/tls/certs/ca-bundle.crt; \ done && \ echo "###############################################" && \ echo "### Install ###" && \ From 372fd00d662cf25c80cc487b9ef2de95afe93d78 Mon Sep 17 00:00:00 2001 From: hamc17 Date: Fri, 26 Jun 2026 12:27:43 +0200 Subject: [PATCH 4/4] Use continue to avoid exit code of 1 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b322e5..9e51375 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,8 @@ RUN \ echo "### Import trusted certs before doing anything else ###" && \ echo "######################################################" && \ for CERT_PATH in "/opt/certs/"*.pem "/opt/certs/"*.crt; \ - do [ -e "$CERT_PATH" ] && cat "$CERT_PATH" >> /etc/pki/tls/certs/ca-bundle.crt; \ + do [ -e "$CERT_PATH" ] || continue; \ + cat "$CERT_PATH" >> /etc/pki/tls/certs/ca-bundle.crt; \ done && \ echo "###############################################" && \ echo "### Install ###" && \