Skip to content

Commit

Permalink
Updated php-fpm image to correctly update ca trust
Browse files Browse the repository at this point in the history
This resolves issue where running update-ca-trust would remove the warden root ca from trust, and also adds support for mounting a PEM into /etc/pki/ca-trust/source/anchors when an additional root cert should be trusted by the processes in the container.
  • Loading branch information
davidalger authored Mar 23, 2020
1 parent 35cbd4e commit 3a841b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion images/php-fpm/context/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ cat /etc/php.d/05-additions.ini.template \

# append warden issued root ca cert to ca-bundle trusted by curl/openssl
if [ -f /etc/ssl/warden-rootca-cert/ca.cert.pem ]; then
cat /etc/ssl/warden-rootca-cert/ca.cert.pem | sudo tee -a /etc/ssl/certs/ca-bundle.crt >/dev/null
sudo cp /etc/ssl/warden-rootca-cert/ca.cert.pem /etc/pki/ca-trust/source/anchors/warden-rootca-cert.pem
fi

# update trust outside if condition above to allow mounting PEM files into /etc/pki/ca-trust/source/anchors
sudo update-ca-trust

# start socat process in background to connect sockets used for agent access within container environment
if [[ -S /run/host-services/ssh-auth.sock ]] \
&& [[ "${SSH_AUTH_SOCK}" != "/run/host-services/ssh-auth.sock" ]]
Expand Down

0 comments on commit 3a841b7

Please sign in to comment.