forked from docker-library/mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move init-file processing into a function
files found within /docker-entrypoint-initdb.d/* are processed using specific rules based on their filename. It was previously difficult to re-use this logic recursively, or to add logic for handling additional filetypes. By moving this logic into a shell function, we both enable inner shell scripts to easily re-use the same logic (for example, for including files from additional directories or sub-directories), and the possibility of overriding these processing rules entirely, for example to enable handling of additional filename patterns. There is a potential change of functionality compared to the previous version: the mysql command can no-longer be overridden by changing the mysql variable. Instead, the mysql command may be overridden only by overriding the process_init_file() function. There is a potentially loss of functionality in that included scripts can no-longer use "break" to escape the file loop. There is presently no work-around for this, as this is not expected to have been an intended feature.
- Loading branch information
Showing
4 changed files
with
76 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters