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?