In order to resolve an issue, I am now trying install the mysql pdo via
docker-php-ext-install
as pointed out in the README of the php imag
You can achieve this with only 3 short lines of code. Here is an example for PHP7.4-FPM (Check the attached github link for guidance on other image variants and versions)
Dockerfile:
FROM php:7.4-fpm
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
RUN install-php-extensions mysqli pdo_mysql
As of the posting of this response the plugin supports up to 80 PHP Extensions which I find it supper amazing. You can get more info on this github repository