Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-desktop doesn't work good with WSL2 systemd #13105

Closed
3 tasks done
smallst opened this issue Nov 30, 2022 · 4 comments
Closed
3 tasks done

docker-desktop doesn't work good with WSL2 systemd #13105

smallst opened this issue Nov 30, 2022 · 4 comments

Comments

@smallst
Copy link

smallst commented Nov 30, 2022

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 533EEDEC-5C97-40E7-B295-4E31D9D4531B/20221130013526

Actual behavior

when wsl2 enable the systemd in /etc/wsl.conf, the docker-desktop start with 2 or 3 error message (detailed info here, and the docker login in wsl doesn't store the login credentials into docker-desktop (login success but cannot pull/push to private images). while, remove the "credsStore": "desktop.exe" line in .docker/config.json in wsl makes login work good. also, disable the systems in /etc/wsl.conf make the error dialog gone and login works good.

Expected behavior

I hope docker-desktop can work together with wsl-systemd

Information

  • Windows Version: win 11 [ version 10.0.22621.674 ]
  • Docker Desktop Version: 4.14.1 (91661)
  • WSL2 or Hyper-V backend? WSL2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: Nope. windows run in real PC
    I believe the problem comes with wsl2-systemd, which enabled in my PC with win11 22H2

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

diagnose.log

Steps to reproduce the behavior

I don't really know if the problem can be reproduce, but you can try

  1. enable systemd=true in /etc/wsl.conf, like this:
    image

  2. open wsl first, then open docker-desktop. the error dialog may appear.

@giupb
Copy link

giupb commented Dec 3, 2022

I also use WSL2 and I had this mount shared volume problem with kind: docker: Error response from daemon: path /home/my/path is mounted on / but it is not a shared mount
I found this issue that point me that k8 documentation suggest to set MountFlag=shared in the Docker's systemd service file.

But I didn't find docker service at WSL systemd.

So i found this solution that suggest to set $ sudo mount --make-shared / and it works.

My question is: Docker Desktop in Windows 11 use WSL2 systemd?

@smallst
Copy link
Author

smallst commented Dec 3, 2022

@giupb 's comment inspire me. that my 3 error dialogs should be 3 connections to my each WSL instances. -- my default Arch, docker-desktop and docker-desktop-data. So is docker desktop in windows try to connect something to each instances and trigger wslg connection error when systemd enabled for any instances?

@docker-robott
Copy link
Collaborator

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

@docker docker locked and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants