Skip to content

Commit

Permalink
Trust custom certificates/CA if you choose to
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed May 15, 2018
1 parent 1df7427 commit 90458c9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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}"
}
6 changes: 6 additions & 0 deletions Dockerfiles/work/data/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
###
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,18 @@ Have a look at the following table to see all offered volumes for each Docker im
<td colspan="3"></td>
</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>Mount this directory into your host computer and add custom configuration files for <code>bash</code> and other tools.</td>
</tr>
<tr>
<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>
</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>
</table>

Expand Down

0 comments on commit 90458c9

Please sign in to comment.