How to get access to php.ini file

I think the best thing for you would be to mount that file from outside of the container.
I would do t he same with plugin directory, so you won’t loose those either.

You can find more details about mounting files from outside of the container in “volumes” section of compose documentation.

Sincerely,
Grzegorz