Configuration
In yourdocker-compose.yml, extend the PHP container command and mount the certificate bundle as a volume:
The example path
/etc/pki/tls/certs/ca-bundle.crt is typical for RHEL/CentOS systems. On Debian/Ubuntu, the system CA bundle is often at /etc/ssl/certs/ca-certificates.crt. Adjust the host path to match your distribution.Apply
Save yourdocker-compose.yml and restart the containers:
docker compose up -d php.
How It Works
On PHP container startup, the customized command runs these steps automatically—you do not need to execute anything manually:- The CA bundle is mounted from the host to
/usr/local/share/ca-certificates/. update-ca-certificatesadds the certificates to the system-wide trust store./scripts/run.shstarts VARIOS AI as usual.
Result
After the container starts:- The host’s CA bundle is available inside the container.
- The certificates are registered in the system-wide trust store.
- Applications in the container can establish TLS connections to servers signed by these CAs.
Typical Use Cases
- Using an internal corporate CA
- Accessing internal APIs with self-signed certificates
- Trust for private container registries or package repositories
