Mysql / PHP and wordpress in docker

Hi,

I’m new to docker and I would like to have a standard web server using PHP, mysql to develop wordpress.

I know that a docker version of wordpress as I tested it yesterday. However I would like to be able to test different version of PHP, MySQL and wordpress together so AFAIK wordpress docker is based only on php 7.4.30 while sometimes I would like to test php 8.0 with a different version of MySQL, both should include xdebug and other extensions.

So in this purpose I decided to create a docker-compose file and to stack mysql and php. So I can have several different version of docker file to test mysql 8 + php 8, and mysql 5.7 with php 7.4 for example with local volumes to make mysql data and wordpress persistent.

Those 2 dockerfiles work great, however my issue raises while I try to install wordpress in the php volume.
I use adminer and everything works great, so php with mysql is ok.

I create an user and a database as usual for wordpress. I tested it using adminer and it works.

However when i try to create tables and configure wp-config.php thanks to installation steps (step 1), wordpress says there is a fatal error, so tables are not created and WP installation is not done.

It’s like system is not able to set wordpress variable correctly.

Any idea what could it be under docker ?

thx

FATAL error could be anything. Check the logs and if you haven’t done it yet, enable debug logs How to Turn Off PHP Errors in WordPress