I'm non-interactively setting up MediaWiki sites with containers, backed by a MariaDB database. All site specifics must be defined as variables in a configuration file.
One step in the setup is to initialize the database.
The only supported way I can find of doing that is by calling maintenance/install.php, which (at least in version 1.35) refuses to run when LocalSettings.php exists. It exists - it is installed when the container image is built. The database can't be installed at that time.
A workaround is to temporarily move the file away when calling install.php, but that is ugly - it keeps us from making the configuration read-only.
Is there a supported alternative way to script installing the database that is stable across MediaWiki releases?