Cant connect to remote SQL server from Dash app running inside Docker container

Hello,
I have a simple dash app that reads an sql database on a remote machine and displays the information in a table. It runs fine from IIS or locally .
I then tried to deploy my Dash app using docker desktop on windows. The app runs inside the container and is visible from the HOST PC as well but it doesnt connect to the remote sql database

I use use SQLAlchemy to connect to sql server

msSqlOdbcConn = f'DRIVER={{{odbcDriverName}}};SERVER={server};DATABASE={dbName};UID={user_name};PWD={password};Encrypt=no;TrustServerCertificate=yes;'

        msSqlConnUrl = f"mssql+pyodbc:///?odbc_connect={msSqlOdbcConn}"
        engine = create_engine(msSqlConnUrl,pool_size=5, connect_args={'timeout': 5})

But i get the error below:

(pyodbc.OperationalError) ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol] (-1) (SQLDriverConnect)')
(Background on this error at: https://sqlalche.me/e/20/e3q8)

Can anyone suggest what could be a potential fix for this issue?
Thanks !

Hello @biz,

I think you might need to configure the container to use certain ports.

Or, you might be running into an issue where the drivers arent installed for the docker to connect to the SQL server.

Hello, i have installed the ODBC Driver 17 for SQL Server as part of the docker image.

I think you might need to configure the container to use certain ports.

Can you give me an example of what this configuration might look like?