microsoft / vscode-iot-workbench

Azure IoT Device Workbench for Visual Studio Code
170 stars 74 forks source link

[IoT Workbench] Embedded Linux project Hangs using Docker Desktop preview with WSL2 #741

Open darenm opened 5 years ago

darenm commented 5 years ago

I tried to create a project using docker desktop 2.1.1.0 from the edge channel configured to use WSL2.

image

Unfortunately it hangs when trying to start the development container:

Setting up container for folder or workspace: C:\Users\daren\Documents\IoTWorkbenchProjects\projects\ConnectionTest
Run: docker build -f C:\Users\daren\Documents\IoTWorkbenchProjects\projects\ConnectionTest\.devcontainer\Dockerfile -t rpi32_iothub C:\Users\daren\Documents\IoTWorkbenchProjects\projects\ConnectionTest\.devcontainer
Sending build context to Docker daemon  3.072kB
Step 1/1 : FROM mcr.microsoft.com/iot-device-cube:1.0.0-azure-c-app-20190705-ubuntu-arm32
 ---> 2de276df56b7
Successfully built 2de276df56b7
Successfully tagged rpi32_iothub:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Run: docker run -a STDOUT -a STDERR --mount type=bind,source=C:\Users\daren\Documents\IoTWorkbenchProjects\projects\ConnectionTest,target=/workspaces/ConnectionTest,consistency=cached -l vsch.quality=stable -l vsch.local.folder=C:\Users\daren\Documents\IoTWorkbenchProjects\projects\ConnectionTest -l vsch.remote.devPort=0 --entrypoint /bin/sh rpi32_iothub -c echo Container started ;  while sleep 1; do :; done
Container started

image

zunhu commented 5 years ago

Hi, hmm.. sometimes it is not hang and just not show up installing details.

if it is spend long time, you can close VSCode and re-open VSCode, Dev Container will be continue install.

darenm commented 5 years ago

I tried this multiple times, exiting VScode and restarted resulted in the same hang. However, as soon as I disabled the WSL2 feature of the Docker install, it worked. Therefore my issue still hangs - did you try it with the version of docker and WSL2 feature enabled?

https://docs.docker.com/docker-for-windows/wsl-tech-preview/

Thanks,

Daren


From: zunhu notifications@github.com Sent: Thursday, September 5, 2019 11:20:09 PM To: microsoft/vscode-iot-workbench vscode-iot-workbench@noreply.github.com Cc: Daren May daren@custommayd.com; Author author@noreply.github.com Subject: Re: [microsoft/vscode-iot-workbench] [IoT Workbench] Embedded Linux project Hangs using Docker Desktop preview with WSL2 (#741)

Hi, hmm.. sometimes it is not hang and just not show up installing details.

if it is spend long time, you can close VSCode and re-open VSCode, Dev Container will be continue install.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode-iot-workbench/issues/741?email_source=notifications&email_token=AAMY4WYDC2G7YTSM65XVXUTQIHSATA5CNFSM4IUCVZ7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6BYF3Y#issuecomment-528712431, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAMY4W526C6WOI2AXCPLKBTQIHSATANCNFSM4IUCVZ7A.

zunhu commented 5 years ago

For WSL2 during our developing we haven't test on it. I'm trying to use WSL2 to repo this issue, if so, I will mark this issue as a bug. Will update you soon.

zunhu commented 5 years ago

Hi darenm, I've tried to enable docker WSL2, but can't find WSL option from docker. Even I've installed WSL and ubuntu. installed docker version: Docker Desktop WSL 2 Tech Preview Installer.

May I know which version of docker have you installed? Or what I've missed.

image image

image image

darenm commented 5 years ago

Have you enabled WSL2 in Windows? https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

eddess commented 5 years ago

I have:

I notice the same issue. I'm not familiar with the innards but my two cents is that vscode(?)/ extension(?) is somewhat hardwired to wsl1 and not respecting the context selected by the user.

zunhu commented 5 years ago

After I installed win10 insider version 18980, I can enable wsl2 in docker. Issue can be repro on my side and I will let developer know.

image

zunhu commented 5 years ago

Hi, since we just support local docker but not wsl1 wsl2 by design. I mark this issue as a feature.

darenm commented 5 years ago

Are you guys aware that this will soon be the only way Docker Desktop runs on Windows? It will be replacing the HyperV implementation. See below.

https://engineering.docker.com/2019/06/docker-hearts-wsl-2/

dilin-MS commented 5 years ago

Hi, @darenm , could you please share your C drive in Docker Desktop for WSL 2 setting and re-try? Let me know if you still have problem. Thanks! dc1ffcc8-d8b7-412a-b87e-712d1e85038f

darenm commented 5 years ago

Yes it is shared. It looks like this is a broad issue with how VSCode interacts with Docker:

dilin-MS commented 5 years ago

Yes, we would talk with VS Code Remote team to follow up this feature. Fix it ASAP. Thanks for your active participation!