I have tried to enable mysqli on the official php docker image by writing and using a custom Dockerfile, like so:
FROM php:7.4 RUN docker-php-ext-install mys