Closed yayitazale closed 1 year ago
Can you open a shell in the container and echo $LD_LIBRARY_PATH
and make sure that the var exists and points to a valid path in the container?
You might also have a look at one of the pre-built images that have instant client to compare to your Dockerfile
:
https://github.com/oracle/docker-images/tree/main/OracleInstantClient
Can you open a shell in the container and
echo $LD_LIBRARY_PATH
and make sure that the var exists and points to a valid path in the container?
Var exists and points to the installation path and it doesn't work.
I am answering myself in case the solution I have found is useful to someone else. Installing the "oracleinstantclient" on a linux host is not working as there are some components missing.
To avoid this you should use this dockerfile https://github.com/RyuunosukeDS3/node-red-docker-oracle/blob/main/Dockerfile.custom and build your own image witch will install the oracle client itself and the missing "libaio" && "libaio libnsl libc6-compat" inside the container. Then it will automatically add the ENV /lib
to the container so in node-red, in the "Instant Client Path" you should add something like: /lib/instantclient_21_10
but changing the name to the latest version available at https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
Then you should be able to connect to the oracleDB.
I have installed the Instant Client Basic in the host server and shared the folder path with the node-red container but I get this error:
The install path is mounted under the path _/data/files/Oracle/instantclient_215 so that's the folder defined on the config node.
Node-oracledb is installed on both host and container and LD_LIBRARY_PATH is set to its path on both host and container.
What I'm doing wrong?
Thanks