mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-19 07:21:16 +00:00
Trust custom certificates/CA if you choose to
This commit is contained in:
26
Dockerfiles/work/data/docker-entrypoint.d/41-update-ca-certificates.sh
Executable file
26
Dockerfiles/work/data/docker-entrypoint.d/41-update-ca-certificates.sh
Executable file
@@ -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}"
|
||||||
|
}
|
||||||
@@ -182,6 +182,12 @@ run "chmod 0755 /shared/backups" "${DEBUG_LEVEL}"
|
|||||||
run "chmod 0755 /shared/httpd" "${DEBUG_LEVEL}"
|
run "chmod 0755 /shared/httpd" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Update ca-certificates
|
||||||
|
###
|
||||||
|
update_ca_certificates "/ca" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Startup
|
### Startup
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -697,7 +697,7 @@ Have a look at the following table to see all offered volumes for each Docker im
|
|||||||
<td colspan="3"></td>
|
<td colspan="3"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2"><strong>work</strong></td>
|
<td rowspan="3"><strong>work</strong></td>
|
||||||
<td><code>/etc/bashrc-devilbox.d</code></td>
|
<td><code>/etc/bashrc-devilbox.d</code></td>
|
||||||
<td>Mount this directory into your host computer and add custom configuration files for <code>bash</code> and other tools.</td>
|
<td>Mount this directory into your host computer and add custom configuration files for <code>bash</code> and other tools.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -705,6 +705,10 @@ Have a look at the following table to see all offered volumes for each Docker im
|
|||||||
<td><code>/shared/backups</code></td>
|
<td><code>/shared/backups</code></td>
|
||||||
<td>Mount this directory into your host computer to access MySQL backups created by <a href="https://mysqldump-secure.org" >mysqldump-secure</a>.</td>
|
<td>Mount this directory into your host computer to access MySQL backups created by <a href="https://mysqldump-secure.org" >mysqldump-secure</a>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>/ca</code></td>
|
||||||
|
<td>Mount this directory into your host computer to bake any *.crt file that is located in there as a trusted SSL entity.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user