Connection to SQL server database fails through docker

I have a Flask app using SQL server database. The app runs successfully on my local machine. But when I try to start the app using Docker, I’m running into below error

pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/' : file not found (0) (SQLDriverConnect)")

I followed the instructions given in the following link and created the odbcinst.ini file.

Connect docker python to SQL server with pyodbc

I specified the driver as


Are there some other settings needed that I am failing to provide here?

Kindly help me figure this out. Thanks in advance.

Source: StackOverflow