0

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.

Kasia Gogolek
  • 3,374
  • 4
  • 33
  • 50

1 Answers1

0

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
yamenk
  • 46,736
  • 10
  • 93
  • 87
  • thanks for the comment, i tried both way, but issue is same. – user22236 Mar 15 '18 at 13:39
  • If you can't find `libsqora.so.11.1` inside the image, then instantclient is not sufficient. You will need to install the oracle server. – yamenk Mar 15 '18 at 13:44