Connect to SQL Server in local machine (host) from docker using host.docker.internal Connect to SQL Server in local machine (host) from docker using host.docker.internal sql-server sql-server

Connect to SQL Server in local machine (host) from docker using host.docker.internal


If anyone have similar problem, here's how I solve it

  • Open SQL Server Configuration Manager
  • Enable TCP/IP in Server Network Configuration
  • Restart SQL Service Service

TCP/IP

If it's still not working, there are a few more things to check

  1. Firewall (open port 1433)
  2. Enable remote connections to your sql server

enter image description here