Monitoring PHP app inside docker container

Hi, I have to monitor a PHP application that lives inside a docker container, and I have a couple of begginers doubts.

  • Can I monitor the application with the agent installed outside the docker container?

  • the host server of the application (where the PHP agent has to be installed) has the firewalld active, what port should I open for the agent can communicate with the APM server?

  • this comunication, between the agent and APM server is bi-directional? or the agent just send data and doesn't receives data.

Thanks!