我正在尝试使用host.docker.internal
连接到在我的本地计算机上运行的SQL Server实例(根据https://docs.docker.com/docker-for-windows/networking/#use-cases-and-workarounds中的建议)
host.docker.internal
已成功解析为IP,并且可以ping通
我在防火墙配置
中打开了端口 1433错误消息
连接被拒绝192.168.65.2:1433
我的连接字符串
Data Source = host.docker.internal,1433; Initial Catalog =; Persist Security Info = False; User ID =; Password =; MultipleActiveResultSets = True; Encrypt = True; TrustServerCertificate = False; Connection Timeout = 30;
泊坞广告版
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:22:38 2018
OS/Arch: linux/amd64
Experimental: true
适用于Windows版本的Docker