-
Notifications
You must be signed in to change notification settings - Fork 292
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
[WSL2] docker pull works only when executed with sudo #7808
Comments
That's weird. Any ideas, @simonferquel? |
@ad-on-is what WSL2 distro are you running? Can you try use Ubuntu and confirm if you've got the same issue, could be that the distro you're using has some kind of elevated permission system. I just tested on a clean install, latest version of everything with the Ubuntu WSL2 and it works fine. |
@ad-on-is I've just faced with the same things. Try to delete |
I have Ubuntu 20.04 (as described) as my default distro and Kali for occasional use-cases. Non of them are able to execute the pull command without sudo. But this used to work previously. Although I didn't change anything except updating Windows and Docker, so there must have happened something in one of the updates, that caused this issue. |
I'll give it a try. Will this have any side-effects? Will that file be recreated by Docker again? |
As I can see - no, so far it no longer exist but everything is working now. |
Well, the issue is back after PC restart. |
These are all docker-compose related issues. Strangely docker-compose works without problems. I remember having an issue where it didn't work some weeks ago, and the symlink-solution fixed it since then, and it still works. Removing only the credsStore var, does it recreate credsStore again after restart? |
This also breaks VS Code container support (it hangs while trying to pull any base image you use in your container). This is using docker-compose too. For now, the workaround for me was to delete config.json and then I haven't restarted, but I suspect config.json will be rewritten with credsStore = desktop. |
You shouldn't need to delete the Seems like a issue with your WSL2 and the symlink reading from the credStore. Have you tried this? #6652 (comment) |
My Windows path was already in wsl2, I just tried with the symlink and same thing- it just hangs trying to pull the image. I had to delete |
Your issue seems to be with WSL2 and not Docker directly. I've tested this on a workbench, latest version Windows, latest version Docker, Ubuntu (18.04) distro and can't replicate this issue. My only conclusion would be the symlink between @omardelrio @ad-on-is Can you do a diagnostics report |
I tried #6652 which resulted in I too can verify that Just upladed the diagnostics with Diagnostic ID: Additional things I tried so far without success
|
@ad-on-is try rename |
Where's the difference compared to my already stated approach?
|
Ah sorry my bad didn't see you removed that. I'm fairly certain you're getting symlink issues shouldn't be saying the file already exists. |
@narwy Just wanted to point out, that the file is already there. Deleting and symlinking again, worked ofc as expected. |
@ad-on-is after the symlink does it still hang or does pull the images? |
It still hangs.
@narwy Sorry, to sound a bit harsh, but do you even read my comments, before asking questions? I mean, each time you ask a question, it's about something I already stated. This just spams the thread unnecessarily. |
Didn't really say if it fixed the hanging or if it was just the symlink fixing, so just wanted to clarify. |
Right, but #7808 (comment) clearly says everything. |
Diagnostics ID: |
I'm not sure why @narwy is asking for diagnostics IDs as he is not a Docker employee and so won't be able to see them. It's nice that community members can help out on tickets, but they can't see the diagnostics that people send. |
@stephen-turner was dropping the question so when you guys had time you can look into it instead of asking them. Seen as neither was provided |
I narrowed it down to interraction with the win32 credential helper. In the Has something changed about this in recent builds ? |
@benhillis Simple repro case on a machine with latest docker-desktop edge installed: |
i just upgraded to 20175 over the weekend and running into same issue.. the temp workaround of removing the creds does work. |
Thanks, @simonferquel. This is now microsoft/WSL#5664. I'm going to close this ticket as it's a Windows bug not a Docker Desktop bug. |
Microsoft broke insider release because it contains a broken Powershell 2.0 core feature. This feature was planned to be deprecated due to security reasons but still appears in /get-features list as "enabled". Such a bug breaks the Windows image completely. I already tried all receipts including removal related keys from the Windows registry, manual cleanup of winSxS folder, etc. Nothing helps. It looks like the only possibility to repair Windows image is the installation of the new image provided by Microsoft. |
Just for completeness, the Microsoft bug Simon filed has now been duped against microsoft/WSL#5648, so that's the one to follow now. |
Same issue here with Windows 10 20175. Removing the |
This WSL2 bug microsoft/WSL#5664 does effect Docker, it is not an issue with Docker. We are hopeful for a fix soon. Right now Windows 20175 and 20180 have this issue. You can disable the WSL2 backend in your Docker settings for now. You won't find docker in your WSL2 path anymore but you can work around this temporarily with:
Docker on the Windows side (powershell, cmd, etc) will behave normally. |
Windows 20185, problem still persists |
Fixed in Windows 10 Build 20190 |
@ad-on-is Im on the 20190 build, and docker pull still doesn't work until I delete the config.json .. Are you sure its fixed? Did you do something else also? |
I just checked and saw I was using a clean config.json, which Docker created after I dirtyfix-deleted the old one. Now, I restored my previous config.json which has additional repositories and all settings, and it still works. So, technically, I did not change anything. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
I just realised that when using Docker inside WSL2, the pull command is not working. When executing
docker pull image
it just hangs there doing nothing. Restarted Docker, WSL and even my computer, without success. But when usingsudo docker pull image
it works. This used to work previously. Did something change regarding the permissions?docker -v
,docker ps
... etc. all works.The user has the
docker
group assigned to it.System
Docker 2.3.3.2 (46784)
Windows 10 20175
WSL2: Ubuntu 20.04
Expected behaviour (Works from within PowerShell)
Actual behaviour (from WSL2)
Observations
Removing
~/.docker/config.json
seems to solve the issue, but this file is re-created after restarting Docker or rebooting Windows.The text was updated successfully, but these errors were encountered: