I will change the default configuration file and then mount it to container. Using the volumes option to mount/sync the files on docker-compose.
volumes: - ./myfiles/config.php:/var/www/html/api/config.php
At first the two files are exactly the same. I open host file of /myfiles/config.php and edit change it. Restart the docker and see that this file is overwritten from the container file. How can I state that the host file is more important. That the priority should be given to it.