Docker容器中连接Sql Server数据库报错 provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed
Docker容器中连接Sql Server数据库报错内容:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed)
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
RUN sed -i 's/TLSv1.2/TLSv1/g' /etc/ssl/openssl.cnf \
&& sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf