How to edit a file in a running container?

use docker cp to copy the file from a running container to the host. Edit it one the host. Add a volume to your docker-compose.yml that mapps the host file on /opt/bitnami/php/lib/php.in in the container. Container are ephemeral/disposable. Whenever a container is recreated, it will start from the scratch. Ony data written in volume will survive.

1 Like