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/libmsodbcsql-17.3.so.1.1' : 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

/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1

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

Kindly help me figure this out. Thanks in advance.

Source: StackOverflow