I have a requirement of running a software script just after the container is built. Ive tried mounting a new volume and executing it using the whole path but i keep getting the below error.
So basically the problem is while executing your postbuild.sql script.
Since you didn’t share any details about your directory structure and the file content, I can only guess that either the file does not exist on that path or the permissions prevent the container process from accessing the file.
okay, ive managed to attach the software to the volume and it can now be seen.
The problem im now having is that it does not do a complete install [of utlPLSQL Releases · utPLSQL/utPLSQL · GitHub] when i call the global script "install_headless.sql - which then calls other referenced scripts and somehow its incomplete when its runs. When i do it manually, it works smoothly.
1 |
db_1 | Creating utPLSQL user UT3
db_1 | --------------------------------------------------------------
db_1 | Installing utPLSQL v3 framework into UT3 schema
db_1 | --------------------------------------------------------------
db_1 | Switching current schema to UT3
db_1 | --------------------------------------------------------------
db_1 | Installing component UT_DBMS_OUTPUT_CACHE
db_1 | O/S Message: No such file or directory
db_1 |
db_1 |
db_1 | DONE: Executing user defined scripts
db_1 |
I am too far away from oracle databases to know what the problem is or how to tackle it.
Though, we do know that a) executing scripts on database creation is possible (but fails) and b) executing the script manually inside the container works as expected. So you might want to investigate what the entry point script does different in calling the scripts.
Yes if we specify a .sql or .sh , it would work generally But if we specify a path to a parent sql that has sub sql files on the same folder, it does not like it. Error is the same as above.
The error is no Oracle specific but how Docker-compose does not like embedding a path to a bunch of sql files.
I am going to state the obvious: If you plan to run your scripts inside the container, they need to be configured to use the paths that exist inside the container.
i can confirm the path does exist in the container and i can execute this manually inside the container and “does not fail”
where as if executed via docker compose the script does not run as expected.