Somewhat surprisingly, I have been unable to find an answer to this, which I feel is a common situation.
So, I am trying to write a docker file in which I would initialize an oracle database and then run a script with SQL queries.
In my folder, I have the following files: dockerfile, dbInit.sql
My dockerfile looks like this:
FROM store/oracle/database-enterprise:12.2.0.1-slim
ADD dbModelAndInit.sql /docker-entrypoint-initdb.d/
EXPOSE 1521
After building and running the image, a database is running, but the file is not executed.
Any help would be greatly appreciated.
I have the same problem and as far as I know, files in "docker-entrypoint-initdb.d" are executed automatically, is that right? But I'm not sure that is this particular image "store/oracle/database-enterprise:12.2.0.1-slim" the scripts placed in this path are executed automatically.