Reputation: 1364
My DB connection string uses this: Data Source=.\\sqlexpress;
to point to the DB,
this works when running the project diectly but not when running it inside docker locally using docker-desktop.
I tried using Data Source=localhost,1433;
and mapping the port 1433:1433
in compose.yaml, but it didn't help, also I was looking in TCPView
, didn't see SQL listening to 1433
or any other port.
Has anyone ever managed to connect to the localhost sqlexpress from inside docker container running also on localost?
Upvotes: 0
Views: 350