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 on WSL 2 #416

Closed
purplefeetguy opened this issue Jun 14, 2019 — with docs.microsoft.com · 4 comments
Closed

Docker on WSL 2 #416

purplefeetguy opened this issue Jun 14, 2019 — with docs.microsoft.com · 4 comments

Comments

Copy link

This only worked for me using an elevated powershell session:

PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION

  • Ubuntu Stopped 2
    PS C:\WINDOWS\system32>

└──☻ sudo service docker status

  • Docker is not running

└──☻ sudo service docker start

  • Starting Docker: docker

└──☻ sudo service docker status

  • Docker is running

└──☻ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: b19a43be-b16a-d903-b69d-75dffce6c329
  • Version Independent ID: f9d4a118-1251-8d6b-43f5-2e64808dc527
  • Content: Install WSL 2
  • Content Source: WSL/wsl2-install.md
  • Product: windows-subsystem-for-linux
  • GitHub Login: @mscraigloewen
  • Microsoft Alias: mscraigloewen
@craigloewen-msft
Copy link
Collaborator

Instead of using the sudo service docker start command please try using: /etc/init.d/docker start.

This shouldn't require you to use an elevated powershell instance. Does this solve your problem?

Copy link

Out of curiosity, are you running a guest using WSL with a docker container inside? VMception?

@purplefeetguy
Copy link
Author

no, Hyper-V, WSL 2 with docker installed in WSL 2. I have tried to convert existing WSL deployments on 2 different systems now and both required an elevated powershell session to successfully convert. Once converted, the "service" commands worked fine within WSL 2.

@craigloewen-msft
Copy link
Collaborator

@purplefeetguy it seems like your original issue is resolved so I'll close out this issue. :) If it isn't, please re-open!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants