I was able to build and run a SQL Server database through a Dockerfile, exposing the standard port and providing the proper build arguments but am unable to connect after setting up a TCP Proxy (since this is a Docker-based deployment and not a supported Database Service it doesn't have a connection string if I understand right).
The error I first receive when trying to connect from SQL Server Management Studio is:
Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
I also receive the error:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Framework Microsoft SqlClient Data Provider)
Is this a TLS issue? I've tried various combinations of encrypt and trust server certificate parameters but to no avail.