מנסה לכלול PHP 7 במכולת Discourse

PHP 7.4 went end-of-life almost three years ago so I suspect you might want to raise that version number to something along the lines of 8.3.

I suggest that you keep PHP and all the associated logic in a separate container and just proxy everything /amp to it.