mssql-docker
mssql-docker copied to clipboard
feat: run init sql script on first time run
Using init scripts is a quite common pattern in sql docker images like mysql does for instance.
The purpose of this PR is to add into the start.ps1 the ability to check the folder docker-entrypoint-initdb and run all sql scripts inside. Once it is done, the script creates a flag file to avoid running the setup phase on the next startup after a stop.
I updated the README as an alternative.
Let's discuss!
Hello.
Is it possible to merge the PR ?
Here, I am looking for same functionality.
I created a downstream example that runs an init script when the server is ready (also blocks network connections when not ready/initialized)... should be able to use that as an example to work from.
https://github.com/tracker1/mssql-docker-enhanced
Hi @tracker1 , thank you for your comment.
https://github.com/tracker1/mssql-docker-enhanced
I have tried to access to the provided link but it seems to be private repo.
Would considerate to make it public for others to use?
Regards,
Eduardo
@EduardoSantanaSeverino sorry, should be public now.
Any update ? All the databases even oracle has the
volumes:
- ./my/scripts:/docker-entrypoint-initdb.d
In the mid time I added that feature :
https://hub.docker.com/r/usildevops/mssql-docker-enhanced
This is the reason I prefer other SQL vendors (MySQL/Postgres)... This is a feature that should've long existed by now. 🤦♂️
😭