diff --git a/Dockerfiles/work/data/docker-entrypoint.d/41-update-ca-certificates.sh b/Dockerfiles/work/data/docker-entrypoint.d/41-update-ca-certificates.sh new file mode 100755 index 00000000..53c21b3d --- /dev/null +++ b/Dockerfiles/work/data/docker-entrypoint.d/41-update-ca-certificates.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + + +############################################################ +# Functions +############################################################ + +### +### Include certificates/CAs into own system +### +update_ca_certificates() { + local dir="${1}" + local debug="${2}" + + if [ -d "${dir}" ]; then + for cert in $( find "${dir}" -name \*.crt ); do + name="$( basename "${cert}" )" + run "cp ${cert} /usr/local/share/ca-certificates/devilbox-${name}" "${debug}" + done + fi + run "update-ca-certificates" "${debug}" +} diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index fceedc10..f5ffc668 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -182,6 +182,12 @@ run "chmod 0755 /shared/backups" "${DEBUG_LEVEL}" run "chmod 0755 /shared/httpd" "${DEBUG_LEVEL}" +### +### Update ca-certificates +### +update_ca_certificates "/ca" "${DEBUG_LEVEL}" + + ### ### Startup ### diff --git a/README.md b/README.md index 67316c4e..e64b4861 100644 --- a/README.md +++ b/README.md @@ -697,7 +697,7 @@ Have a look at the following table to see all offered volumes for each Docker im
/etc/bashrc-devilbox.d
bash
and other tools./shared/backups
/ca