How to edit a file in a running container?

Thank you. I managed to get phpinfo() to run by just inserting the line phpinfo(); into my php application. That was pretty stupid of me. Anyway, I can’t seem to get the postgresql driver working in my php.ini and thus is my container Now I am going to try inserting “RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql” into the Dockerfile. But honestly, I am not sure how the docker-compose.yml is getting the Dockerfile to recompile the image.