Comments - Extending docker-entrypoint.sh
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Hi, its an outstanding feature request, and you've probably seen https://github.com/MariaDB/mariadb-docker/issues/515. Seems Docker Library people currently want to take your current approach.
You'd need to effectively add source oldentrypoint.sh, and copy most of _main to your entrypoint with changes to run each time it starts.
There probably be large simplifications of this by requesting the original wrapping initialization up into its own function. Feel free to make those non-impacting changes as a pull request - https://github.com/MariaDB/mariadb-docker.
Adding intialization based on mariadb-backups (https://github.com/MariaDB/mariadb-docker/issues/522#issuecomment-1647045650) is going to be another largish change so having intialization in a separate function is going be easier to maintain compatibility.