NetCore DockerDesktop 踩坑记录

1.Program.cs中的 UseUrls("http://localhost:8080") 导致运行后err-empty-response,需移除,原因尚不得知。

2.连接Sql Server

 System.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: 35 - An internal exception was caught)

 解决方法:修改Dockerfile

 FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base 改成:

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic AS base

原文地址:https://www.cnblogs.com/kim-meng/p/14692594.html