0
votes

We are trying to access oracle database from .net mvc application via ODBC driver.

We are able to get data when we are running the application on Windows or Linux machine.

However we are getting below error when we are running application inside docker container.

ERROR [01000] [unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1' : file not found

I tried setting LD_LIBRARY_PATH and other environment variable inside the docker but again n again same issue.

Any help would be appreciated.

1
Can you provide the Dockerfile or image you are using. You need to have the oracle client installed? - yamenk
okay... let me check - Vikash Pandey

1 Answers

0
votes

You are setting the enviornment variables using the proper way for Docker. Check docker ENV vs RUN export for more info.

You need to set the environment variables via the ENV instruction inside the Dockerfile.

ENV ORACLE_HOME /usr/lib/oracle/11.2/client64
ENV LD_LIBRARY_PATH /usr/lib/oracle/11.2/client64/lib