-
Notifications
You must be signed in to change notification settings - Fork 301
Description
After updating to the WSL2 Backend on Docker Desktop 2.1.6.0, I am unable to connect to the WSL2 host from within the container using the ip address obtained from running ip route
from within the container.
I understand that this is a bit of a generic issue; however, the below steps work fine using the WSL2 Tech Preview on Docker Desktop 2.1.0.0; after updating to the WSL2 Backend on Docker Desktop 2.1.6.0, they no longer work.
Diagnostic Id
3EE432E3-080A-4607-B654-B887F9447E4C/20191118202258
Steps to reproduce the behavior
- Update from Docker Desktop 2.1.0.0 to Docker Desktop 2.1.6.0
- Enable WSL 2 Engine
- Switch on WSL Integration Ubuntu-18.04
- Apply & Restart
- In WSL2 Ubuntu-18, run
sudo nc -l 80
to listen for incoming traffic - Confirm that this will receive foreign requests by connecting to it from Windows using your WSL2 VM ip address
- After confirming, run
sudo nc -l 80
again docker build
an image from providedDockerfile
docker run -d
a new container using the imagedocker exec $CONTAINER ip route
where$CONTAINER
is the container from step 9docker exec $CONTAINER wget $IP
where $IP is the default route ip address from step 10
Dockerfile
FROM ubuntu:18.04
USER root
RUN apt update && apt install -y wget iptables iproute2 curl jq
CMD sleep 1000
Expected behavior
Step 8 would result in a successful connection to the WSL2 host, and the HTTP header would be outputted by the sudo nc -l 80
command.
Actual behavior
Step 8 results in: Connecting to $IP:80... failed: Connection refused.
Logs from running step 8
[12:31:08.122][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy >> HEAD /_ping\n"
[12:31:08.124][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy << HEAD /_ping (1.0003ms)\n"
[12:31:08.148][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy >> GET /v1.40/containers/b3/json\n"
[12:31:08.161][APIRequestLogger ][Info ] [938340a2] <Server start> POST http://unix/usage
[12:31:08.162][APIRequestLogger ][Info ] [938340a2] <Server end> POST http://unix/usage -> 200 OK (took 0ms)
[12:31:08.165][APIRequestLogger ][Info ] [fb40cb20] <Server start> POST http://unix/usage
[12:31:08.165][APIRequestLogger ][Info ] [fb40cb20] <Server end> POST http://unix/usage -> 200 OK (took 0ms)
[12:31:08.153][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy << GET /v1.40/containers/b3/json (5.0011ms)\n"
[12:31:08.156][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy >> POST /v1.40/containers/b3/exec\n"
[12:31:08.158][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy << POST /v1.40/containers/b3/exec (2.0057ms)\n"
[12:31:08.159][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy >> POST /v1.40/exec/73179f3c3bee42b445cbddd101f1c479a9945a2b3f1ecbd916449c6f0d4ca7e1/start\n"
[12:31:08.165][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="Upgrading to raw stream"
[12:31:08.225][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy << POST /v1.40/exec/73179f3c3bee42b445cbddd101f1c479a9945a2b3f1ecbd916449c6f0d4ca7e1/start (65.9982ms)\n"
[12:31:08.226][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy >> GET /v1.40/exec/73179f3c3bee42b445cbddd101f1c479a9945a2b3f1ecbd916449c6f0d4ca7e1/json\n"
[12:31:08.229][ApiProxy ][Info ] time="2019-11-18T12:31:08-08:00" msg="proxy << GET /v1.40/exec/73179f3c3bee42b445cbddd101f1c479a9945a2b3f1ecbd916449c6f0d4ca7e1/json (3.0052ms)\n"
[12:31:11.613][FeedbackWindow ][Info ] Open logs
Information
Windows Insider Fast Ring build: 19023.vb_release.191108-1432
Docker Desktop Edge channel version: 2.1.6.0 (40740)