vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

.NET docker debug breaks on remote WSL2 when configureSsl is enabled

Open marc-weber1 opened this issue 3 years ago • 2 comments

  • VSCode Version: 1.71.2
  • Local OS Version: Windows 10 Pro 21H2
  • Remote OS Version: WSL 2 Ubuntu 20.04 LTS
  • Remote Extension/Connection Type: Remote SSH
  • Logs:
The Docker extension will try to connect to 'unix:///var/run/docker.sock', via context 'default'.
Error: Process 'dotnet user-secrets --project "/mnt/c/...' exited with code 1
Error: Command failed : Access to the path '/home/[user]/.microsoft/usersecrets/758a6639-07ef-41d7-aa0d-54086b53b96f' is denied.

Steps to Reproduce:

  1. For a dotnet project, use command palette to generate docker files and initialize for docker debugging
  2. Add "configureSsl": true to docker-build: debug
  3. Run & Debug Docker .NET Core Launch from the launch menu

This should be a non-issue, but "sudo" is not an allowed property anywhere, .microsoft/usersecrets can't be chmod'ed because I'm assuming it's a WSL2 folder, and I can't mount a file with my certificates in it like I can with docker-compose. Is there any other options?

(Repost from the remote extension)

marc-weber1 avatar Sep 19 '22 21:09 marc-weber1

I'll take a look. Does debugging work with configureSsl set to false?

bwateratmsft avatar Sep 20 '22 14:09 bwateratmsft

It seems like it at least builds the container when configureSsl is off, and the container seems to run fine.

marc-weber1 avatar Sep 21 '22 15:09 marc-weber1

@marc-weber1 normally things in /home/[user] would be accessible without needing root / superuser access. Did you change the permissions or were they created with root permissions from the start?

bwateratmsft avatar Mar 08 '23 19:03 bwateratmsft

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

AzCode-Bot avatar Mar 23 '23 05:03 AzCode-Bot