Connecting to Docker SQL Server from another PC

151 Views Asked by At

I cannot find the way to connect to my Docker Microsoft SQL Server through Management Studio if I am on another PC which is on the same internet (LAN).

And I ping my other PC and use RDP to connect to it, so that I think should not be the part of a problem we are looking for....or?

OS: Windows 11

Docker version: 24.0.5, build ced0996 (desktop version)

This is the command I'm using:

docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=MyPass" -p 1433:1433 
       --name sqlserver2022 -v  data2022:/var/opt/mssql 
       --restart unless-stopped -d mcr.microsoft.com/mssql/server:2022-latest 

I tried:

  • Turned off firewall on both PCs
  • Have the turned on settings: Enabled TCP/IP in Server Network Configuration
  • Have allowed remote connections to my SQL Server

And if it's possible to succeed, can I connect only specified IP without port?

0

There are 0 best solutions below