I'm looking into using Docker to streamline my Drupal development workflow. One approach would be to locally create a Docker image for my Drupal installation (not the database, just the Drupal files default found under /var/www/html), and deploy that image to production.
This approach would imply that all changes to the Drupal installation, i.e. all changes to anything under /var/www/html, would be considered immutable or read-only in production. Any changes here would be gone when the next deployment comes along.
I assume the content created by our content creators logged into our production server, is stored in the database, not in the Drupal installation itself.
My question is: Is there any reason why the Docker installation (i.e. files under /var/www/html) would need to be changed when deploying to production, or can these files remain consistent across environments (dev, test, prod)?
Note that I'm quite new to Drupal.