I have tried below command in my docker file but still its giving me the error :-
Dependency unixODBC with minimum version 2.3.1 is required. Unable to load shared library 'libodbc.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibodbc.so.2.so: cannot open shared object file: No such file or directory
FROM 52423406.dkr.ecr.us-east-1.amazonaws.com/base-dev:microsoft-dotnet-2.1-sdk AS buildEnv
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y apt-utils
RUN apt-get install -y odbcinst1debian2 libodbc1 odbcinst unixodbc
RUN apt-get install -y libsasl2-modules-gssapi-mit
RUN apt-get install unzip
RUN wget https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/odbc/2.6.18/SimbaSparkODBC-2.6.18.1030-Debian-64bit.zip && unzip SimbaSparkODBC-2.6.18.1030-Debian-64bit.zip && dpkg -i simbaspark_2.6.18.1030-2_amd64.deb
WORKDIR ./sourceCode
COPY . .
RUN ls
RUN dotnet restore ./Services/Services.csproj --configfile ./nuget.config
# -o paramter value of publish command uses absolute path so that publishOutput folder is in root, using relative path would create it relative to the csproj folder.
RUN dotnet publish --no-restore -c Release -o /publishOutput ./Services.DeletionTool/Services.csproj
FROM 52423406.dkr.ecr.us-east-1.amazonaws.com/base-dev:microsoft-dotnet-2.1-runtime
WORKDIR ./app
COPY --from=buildEnv /publishOutput .
RUN ls
EXPOSE 80
EXPOSE 443
ENTRYPOINT ["dotnet", "Services.DeletionTool.dll"]
To fix this, I have tried installing libodbc1 , looks its getting installed with docker commands but when I am verifying the files in deployed container using kubernates console command, its not showing me the file at /usr/lib/x86_64-linux-gnu/libodbc.so.2 .. Looks like installed files not going to this path after running the docker commands. Please help if any suggestions.