Original (which works fine) docker file which connects to a SQL Server database in Azure looks like this:
version: '3.4'
services:
my.service:
build:
dockerfile: Test/Test/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- MyDatabase__ConnectionString=Server=tcp:xxx.windows.net,1433;Initial Catalog=my-catalog;User ID=SA@dbs;Password='xxx';Persist Security Info=False;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30
What should the "MyDatabase__ConnectionString" be if I want to connect to my local SQL Server Express?
I tried these options, but none work?
tcp:host.docker.internal\\SQLEXPRESS,1433;***
tcp:host.docker.internal\\SQLEXPRESS;***
tcp:localhost\\SQLEXPRESS,1433;***
host.docker.internal\\SQLEXPRESS,1433;***
host.docker.internal\\SQLEXPRESS;***
localhost\\SQLEXPRESS;***
Also note that TCP is enabled for my local SQL Server Express:
\SQLEXPRESS
? – Adrenocorticotropic