Connect to SQL Server database from a docker container

前端 未结 3 577
不知归路
不知归路 2021-02-01 06:49

I have docker for windows installed on my machine. There is a console application targeting .net core 1.0.0 that tries to access a SQL Server database running on a different VM.

3条回答
  •  故里飘歌
    2021-02-01 07:14

    as in this answer

    SQL Server instance string connection in Linux Docker

    According to Saurabh Singh from Microsoft:

    The Instance name support is available in v 1.1 of .Net Core. In v1.0 of .Net Core, Instance names are not supported on OS other than Windows.

    So I don't think you can connect from .Net Core 1.0 running on Linux to an SQL Server using instance name.

    Your choices seem to be:

    don't use instance name
    wait for .Net Core 1.1 (planned for "Fall 2016")
    use pre-release version of .Net Core 1.1
    

提交回复
热议问题