Put init db .sql file in designated directory.
- For
MySql
: /docker-entrypoint-initdb.d/ - For
PostgreSql
: /docker-entrypoint-initdb.d/ - For
MS SQL Server
:- π microsoft/mssql-docker#11
- π https://www.abhith.net/blog/create-sql-server-database-from-a-script-in-docker-compose/
Hopefully, we'll get something like this built into the SQL Server engine and configurable via an env variable (MSSQL_STARTUP_SCRIPTS_DIR or something) in a future release, but for now, this is a good way to handle it.
[microsoft/mssql-docker#11 (comment)] Why Microsft? Why? π«π«π«