Docker: How to install PHP extension
13 October 2023 (Updated 13 October 2023)
Let’s suppose you wanted to install the PDO extension. Here’s how.
Create your custom Dockerfile:
The docker-php-ext-install command is provided by the official php
image.
Build image
Test that extension was installed
You should see pdo_mysql
printed out in the console.
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment