Я получил образ докера для выпуска SQL Server Developer и запустил его:
PS C:\WINDOWS\system32> docker ps -aa
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
81347866fc2b microsoft/mssql-server-windows-developer "powershell -Command…" About an hour ago Up About an hour (healthy) 0.0.0.0:1433->3341/tcp trusting_mccarthy
PS C:\WINDOWS\system32>
Как вы видите, он прослушивает порт 3341.IP-адрес:
PS C:\WINDOWS\system32> docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 8
172.17.234.173
Однако я не могу подключиться к нему с хоста:
PS C:\WINDOWS\system32> sqlcmd -S 172.17.234.173,3341
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: An attempt was made to access a socket in a way forbidden by its access permissions.
.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Должно быть что-то не так.какие-либо подсказки?
PS: я не могу подключиться к 1433:
PS P:\> sqlcmd -S 172.17.234.173,1433
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: An attempt was made to access a socket in a way forbidden by its access permissions.
.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
PS P:\>
Используется команда Docker Run:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong!Passw0rd>" `
-p 1433:1433 --name sql1 `
-d mcr.microsoft.com/mssql-server-windows-developer
note Я также начал с 1433: 3341.Никакой радости в любом случае