it'd be great to have a hook in `entrypoint.sh` for running some pre-startup init scripts, for configuring db users etc like in the PostgreSQL one here: https://github.com/docker-library/postgres/blob/cd294bf8dfdf4a74b2077aa6413fa579f9bf07de/9.3/docker-entrypoint.sh#L76 I'm happy to make a pull request based on above if you agree the approach?
Activity
anilkun commentedon Sep 22, 2015
There is a entrypoint.sh for mongodb. Refer this
https://github.com/docker-library/mongo/tree/14bbc085ef419c141b10595b04fe48c924a8c45e/3.1
anentropic commentedon Sep 22, 2015
@anilkun yes the point is build a hook into that entrypoint script file
otherwise you have to copy and paste the entrypoint script into your project and work out how to write your own hook code
see my PR, they do the same thing in the Postgres image
CpuID commentedon Jul 3, 2016
+1, the initdb.d approach is nice. mysql does the same thing as postgres mentioned above https://github.com/docker-library/mysql/blob/f7a67d7634a68d319988ad6f99729bfeaa84ceb2/5.6/docker-entrypoint.sh#L107-L115