How to run phpinfo() from my apache container?

I am trying to get a connection from my container to AWS Postresql. So I need to modify my php.ini to load the Postgresql driver in php.ini. To see if my method for loading the driver is working I need to run phpinfo() from inside the container. I was told to run interactive php from the host’s cli but I think that will run on the host’s php.ini rather than the containers php.ini (they are different)).

How can I run phpinfo() in the container?

See this article for some good advice on this kind of multiple container implementation:

One more piece you may need is to move the php-fpm port away from the xdebug port in your php-fpm Dockerfile:
RUN sed -i ‘s/9000/8090/’ /usr/local/etc/php-fpm.d/zz-docker.conf
Then you would need to use port 8090 in the apache configuration for the virtual host rather than 9000.