As described in T115432: Get MW_CONFIG_FILE from env to facilitate virtual hosting, we could do something similar to prepend a settings file at /docker/DockerSettings.php, this could be useful for setting up config like T246942.
The file could also be a useful place to take environment variables defined in .env or in docker-compose.override.yml and translate them to MediaWiki config variables.