powerful-electrician-18876
11/17/2022, 9:53 AMcalm-sugar-3169
11/17/2022, 5:56 PMhost.docker.internal
in the host file on windows? that domain is for inside the wsl vm, can you elaborate on what you are trying to do?powerful-electrician-18876
11/18/2022, 2:02 PMcalm-sugar-3169
11/18/2022, 4:51 PMhost.docker.internal
to windows’s host file. In rancher desktop we already add that entry to the wsl’s host file (inside the vm) and that should be mapped to wsl’s interface IP address. This will allow connectivity from your containers to the host using that domain or even an IP address if one wishes to use IP. What IP address are you using on the host side to bind 1433 to?powerful-electrician-18876
11/18/2022, 8:03 PMcalm-sugar-3169
11/18/2022, 8:12 PM0.0.0.0
and try again?powerful-electrician-18876
11/18/2022, 8:19 PMcalm-sugar-3169
11/18/2022, 8:27 PMI am trying run sql server in container. and bind port 1433 to host so that I can connect from host environment.so you can simply use the publish feature in docker e.g
docker run -d -p 1433:[sqlport] sqlImage
this will simply run a sql container and publish the port on the host on 1433, you can then access your database from other containers on host.docker.internal:1433
powerful-electrician-18876
11/18/2022, 8:32 PMsqlserver:
image: "<http://mcr.microsoft.com/mssql/server:2017-CU22-ubuntu-16.04|mcr.microsoft.com/mssql/server:2017-CU22-ubuntu-16.04>"
container_name: sqlserver-integrationtest
environment:
SA_PASSWORD: "******"
ACCEPT_EULA: "Y"
ports:
- "1433:1433"
calm-sugar-3169
11/18/2022, 8:33 PMnetstat -ant | findstr '1433'
powerful-electrician-18876
11/18/2022, 8:34 PMcalm-sugar-3169
11/18/2022, 8:35 PMwsl -d rancher-desktop
and then run netstat -nlp | grep 1433
what do you see in there?powerful-electrician-18876
11/18/2022, 8:36 PMcalm-sugar-3169
11/18/2022, 8:36 PMpowerful-electrician-18876
11/18/2022, 8:37 PMcalm-sugar-3169
11/18/2022, 8:38 PMnetsh interface portproxy show all
on windowspowerful-electrician-18876
11/18/2022, 8:39 PMcalm-sugar-3169
11/18/2022, 8:40 PMpowerful-electrician-18876
11/18/2022, 8:41 PMcalm-sugar-3169
11/18/2022, 8:42 PMpowerful-electrician-18876
11/18/2022, 8:42 PMcalm-sugar-3169
11/18/2022, 8:42 PMdocker-compose.yaml
so I can reproduce it on my endpowerful-electrician-18876
11/18/2022, 8:43 PMcalm-sugar-3169
11/18/2022, 8:43 PMnetsh interface portproxy show all
Listen on ipv4: Connect to ipv4:
Address Port Address Port
--------------- ---------- --------------- ----------
0.0.0.0 1433 172.28.84.230 1433
Listen on ipv6: Connect to ipv6:
Address Port Address Port
--------------- ---------- --------------- ----------
:: 1433 fe80::215:5dff:fe20:4a78 1433
on the windows host side
TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:1433 0.0.0.0:0 LISTENING InHost
TCP [::]:1433 [::]:0 LISTENING InHost
TCP [::1]:1433 [::]:0 LISTENING InHost
/mnt/c/Users/[redacted] # netstat -nlp | grep 1433
tcp 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN 21191/docker-proxy
tcp 0 0 :::1433 :::* LISTEN 21199/docker-proxy
version: "3.2"
services:
sql-server-db:
image: "<http://mcr.microsoft.com/mssql/server:2017-CU22-ubuntu-16.04|mcr.microsoft.com/mssql/server:2017-CU22-ubuntu-16.04>"
container_name: sqlserver-integrationtest
ports:
- "1433:1433"
environment:
SA_PASSWORD: "myPassowrdThingy"
ACCEPT_EULA: "Y"
host
filepowerful-electrician-18876
11/18/2022, 9:17 PMcalm-sugar-3169
11/18/2022, 9:29 PMpowerful-electrician-18876
11/18/2022, 9:30 PMcalm-sugar-3169
11/21/2022, 6:09 PMpowerful-electrician-18876
11/21/2022, 8:27 PM