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

Allow install on Windows 10 Home 18945+ for desktop wsl2 tech preview #4586

Closed
4 tasks
LongLiveCHIEF opened this issue Aug 24, 2019 · 39 comments
Closed
4 tasks

Comments

@LongLiveCHIEF
Copy link

I've successfully gotten docker-for-windows edge to run on Windows 10 Home using WSL2 as the daemon, and mounting \\wsl$\Ubuntu as a mapped drive to get that "native" experience.

With builds 18945+ on Win 10 Home, you don't even have to do anything fancy for bridged networking between host and wsl server. (See: What's new for WSL in Insiders Preview Build 18945)

After getting everything working with native docker on WSL2 and docker-for-win client only on the Windows desktop, I tried to install the WSL2 Tech Preview, but got the familiar error:

Docker Desktop requires Windows 10 Pro or Enterprise version 15063 to run.

If we can be specific about build number for Enterprise version, we should be able to do the same for Windows 10 Home.

Here are the steps I see for allowing the installer to run on Win 10 Home:

  • Check for build number 18917 or higher (depending on what networking code desktop already supports, 18945 could be used/preferred instead
  • Check for -FeatureName VirtualMachinePlatform which would be required for WSL2
  • Check for existing compatible distro installaed and set to wsl version 2
  • Prompt to install/auto-install docker from list of compatible distros
@LongLiveCHIEF LongLiveCHIEF changed the title Allow install on Windows 10 Home 18945+ on wsl2 tech preview Allow install on Windows 10 Home 18945+ for desktop wsl2 tech preview Aug 24, 2019
@jeffbeaman
Copy link

Great timing! I just emailed support on the same issue yesterday.

I'm looking forward to running docker natively in Windows WSL2!

Please enable Docker Desktop for Windows 10 Home build >= 18945

@mario-grx
Copy link

I've successfully gotten docker-for-windows edge to run on Windows 10 Home using WSL2 as the daemon, and mounting \\wsl$\Ubuntu as a mapped drive to get that "native" experience.

@LongLiveCHIEF: Brian, could you please give some more details what you did to get it working? I'm trying to do it myself but obviously I'm missing some step and getting that message.

@LongLiveCHIEF
Copy link
Author

LongLiveCHIEF commented Aug 30, 2019 via email

@thaJeztah
Copy link
Member

You can download the Docker Desktop WSL2 tech preview; read the blog post here; https://blog.docker.com/2019/07/5-things-docker-desktop-wsl2-tech-preview/

@mario-grx
Copy link

Thanks Brian!

@thaJeztah I'll give it a try to the post you pasted but I believe it links to the same one I tried and was giving me the afore-mentioned error about not having Windows Pro.

@LongLiveCHIEF
Copy link
Author

@thaJeztah this issue is open because the wsl2 tech preview can run on Win 10 Home, but isn't allowed, thus I have the instructions for how to set it up on Win 10 Home in the meantime at github.com/LongLiveCHIEF/wsl2-docker-for-win.

@edwinvrgs
Copy link

Thanks for sharing that @LongLiveCHIEF. I'll try your solution

@mario-grx
Copy link

It worked for me. Just a minor point though, for some reason I got installed docker 1.39 on the Ubuntu WSL, so I had to change that in the environmental variables of the description.

Thanks again @LongLiveCHIEF!

@thaJeztah
Copy link
Member

Thanks for clarifying @LongLiveCHIEF - I didn't see a link to the WSL2 Docker Tech Preview mentioned in the first description, so wasn't sure if the Tech Preview had the Windows 10 Home restriction removed (compared to the regular Docker Desktop installer). I'm checking with the Docker Desktop team to see what the status is on that 👍

@edwinvrgs
Copy link

edwinvrgs commented Sep 2, 2019

The solution that @LongLiveCHIEF provides it worked pretty much yet. But, I have a problem when I try to build the containers using a docker-compose.yml file. I'm receiving this error:

Building app ERROR: Forbidden path outside the build context: ../Dockerfile-app ()

The part of docker-compose.yml relative to that is:

app:
    build: 
      context: my-app
      dockerfile: ../Dockerfile-app
    command: npm start
    environment:
      - BASE_URL=http://localhost:3000/
      - NODE_ENV=development
    ports:
      - 3001:3000
    volumes:
      - ./my-app:/home/app/app
      - /home/app/app/node_modules

I already read that this problem was solved in previous versions of docker, but I'm running 19.03.1 so I'm confused. I'll appreciate any help.

PD: this is the output of docker info:

Client:                                                                                                                               Debug Mode: false

Server:
 Containers: 3
  Running: 1
  Paused: 0
  Stopped: 2
 Images: 3
 Server Version: 19.03.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.59-microsoft-standard
 Operating System: Ubuntu 18.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 14.53GiB
 Name: ED-LAPTOP
 ID: GYM5:JLGT:5KKE:YF7Z:DQRO:XKUF:TJPJ:K3QJ:JY6Q:ZRQC:3FCJ:MAJC
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

@edwinvrgs
Copy link

I manage to solve the problem above, using '$PWD' in docker-compose.yml.

My docker-compose.yml:

app:
    build: 
      context: my-app
      dockerfile: $PWD/Dockerfile-app
    command: npm start
    environment:
      - BASE_URL=http://localhost:3000/
      - NODE_ENV=development
    ports:
      - 3001:3000
    volumes:
      - ./my-app:/home/app/app
      - /home/app/app/node_modules

Now I can move on with Docker on WSL 2. However, I'm still confused about that problem being solved in previous versions.

@LongLiveCHIEF
Copy link
Author

@thaJeztah any updates?

Thanks for clarifying @LongLiveCHIEF - I didn't see a link to the WSL2 Docker Tech Preview mentioned in the first description

I should have clarified, the line in my OP that said I tried the WSL Tech Preview was referring to the docker tech preview. I've also got explicit links to the WSL2DTP at the very top of the README for my wsl2-docker-for-win project.

I've been tempted to write some scripts to automate the steps in my documentation, but I imagine docker desktop running on WSL2 works the exact same way at a low level, but I hesitate to spend all that time writing automation that will be obsolete the moment the docker desktop team allows Home SKU's for WSL2DTP.

It's too bad that software isn't Open Source, or I'd move forward with contributing those features and move Docker Desktop for WSL2 forward faster. 😏

@StefanScherer
Copy link
Member

Thanks @LongLiveCHIEF for your interest and your wsl2-docker-for-win project. I love your excitement. 😃 We have Windows 10 Home on our roadmap.

@LongLiveCHIEF
Copy link
Author

@StefanScherer great! can't wait! I've had a lot of interest in my small how-to project, so I imagine you'll have quite a few eager adopters once that feature rolls out!

@gnschenker
Copy link

@StefanScherer ETA on this?

@mat007
Copy link
Member

mat007 commented Nov 25, 2019

@gnschenker the feature has been implemented and the PR is likely going to be merged today, but we still need to figure out when we’ll release it exactly.

@henri9813
Copy link

Hello @mat007 ,
Do you know when the next release will come ?
Thank you very much for implement this feature :D ( or bugfix ? )

@mat007
Copy link
Member

mat007 commented Dec 3, 2019

@henri9813 probably in January, we are busy shipping WSL 2 in a Stable version for Windows Pro/Enterprise at the moment but it’s our next item after that.

@henri9813
Copy link

Thank you for your reply, by curiosity, with WSL2, they are no difference between Windows Home/Pro/entreprise Right ?

@josenobile
Copy link

josenobile commented Jan 9, 2020

Just to let you know, I installed wsl2 in Windows 10 Home, with distro Kali Linux, by using a simple apt-get install docker && service docker start I was able to use docker (build and run), I haven't tested the network functionality yet. Regards to RAM consume, it is pretty similar to the VPS with Linux model used by Docker for Windows, the main difference, is the boot time, super fast.

@StefanScherer
Copy link
Member

@josenobile Nice, I understand you couldn't wait. :-) But please have in mind that Docker Desktop installer will support Windows 10 Home soon and bring docker CLI integration into WSL2 distros.
That's our preferred way. If you give Docker Desktop (comes first with Edge version) please have in mind to uninstall docker again inside the WSL2 distro.

@josenobile
Copy link

josenobile commented Jan 9, 2020

@StefanScherer Just being curious, with my current setup I'm able to build & run & more over the folder of my Windows (/mnt/c/....), use all the Linux tools / commands. Is there any advantages by using Docker Desktop. Maybe this a bit off topic, I'm doing this to replicate as mucho as possible a Kubernetes clusters that I have running distributed in a several Clouds/Regions, for example Docker Desktop will help to setup a Kubernetes cluster in full? and is there any ETA about fixing this bug and release the edge version with it?

@StefanScherer
Copy link
Member

@josenobile Docker Desktop can start the engine automatically after login. The Docker CLI also works from the Windows terminals, if you want to try another distro you don't have to install Docker engine multiple times, ...
No exact ETA, but watch out for the next Edge release.

@andybak
Copy link

andybak commented Jan 22, 2020

Any chance of a rough ETA? Are we talking days, weeks or months?

@kieranbrown
Copy link

kieranbrown commented Jan 22, 2020

Any chance of a rough ETA? Are we talking days, weeks or months?

Here’s a release that works with Windows 10 home :)

https://download-stage.docker.com/win/edge/41944/Docker%20Desktop%20Installer.exe

@mat007
Copy link
Member

mat007 commented Jan 22, 2020

Any chance of a rough ETA? Are we talking days, weeks or months?

We’re looking at a couple of weeks now, three at most.

@JakeQZ
Copy link

JakeQZ commented Jan 27, 2020

Here’s a release that works with Windows 10 home :)

https://download-stage.docker.com/win/edge/41944/Docker%20Desktop%20Installer.exe

The error message looks promising:

Docker Desktop requires Windows 10 Pro/Enterprise (15063+) or Windows 10 Home (19018+)

However, Windows 10 Home 19018 still appears to be in preview. Does it include some essential component Docker requires that 1909 does not have? (And can anyone explain Windows 10 version numbers?)

@yakton
Copy link

yakton commented Jan 27, 2020

Here’s a release that works with Windows 10 home :)
https://download-stage.docker.com/win/edge/41944/Docker%20Desktop%20Installer.exe

The error message looks promising:

Docker Desktop requires Windows 10 Pro/Enterprise (15063+) or Windows 10 Home (19018+)

However, Windows 10 Home 19018 still appears to be in preview. Does it include some essential component Docker requires that 1909 does not have? (And can anyone explain Windows 10 version numbers?)

Windows 1909 is the version of windows 10, 19018 is the OS build information. Windows 10 19018 adds wsl2 which docker has taken advantage of.

@rfay
Copy link
Contributor

rfay commented Feb 2, 2020

@kieranbrown I've been using your staging release with Win 10 Home in WSL2 mode all week, do loads of testing of new ddev release. I have Win 10 Home on slow ring.

I've had an excellent experience with it. I did have to reboot the machine once when everything got slow, but don't know if I can even blame that on Docker.

It was surprising that I can't switch it between WSL2 mode and traditional Windows mode without reinstalling. I'd like to test both with ddev, but it's not easy.

Great work on this! It's going to be fantastic to have our Win10 Home users using something that is consistent on Windows instead of having them use Docker Toolbox.

@jkonowitch
Copy link

https://docs.docker.com/docker-for-windows/edge-release-notes/

New release does not seem to include Windows 10 Home fix?

@mat007
Copy link
Member

mat007 commented Feb 14, 2020

@jkonowitch you’re right, the next Edge release will have this as this Edge release was only to get on par with the Stable version. We’re looking at another couple of weeks wait, sorry about that.

@jkonowitch
Copy link

@jkonowitch you’re right, the next Edge release will have this as this Edge release was only to get on par with the Stable version. We’re looking at another couple of weeks wait, sorry about that.

Thanks for the clarification - looking forward to it!

@Henriquepb22
Copy link

Any chance of a rough ETA? Are we talking days, weeks or months?

Here’s a release that works with Windows 10 home :)

https://download-stage.docker.com/win/edge/41944/Docker%20Desktop%20Installer.exe

so if i install this version now, i can undo/unistall everything from https://github.com/LongLiveCHIEF/wsl2-docker-for-win
?

@StefanScherer
Copy link
Member

@Henriquepb22 Correct, if you install Docker Desktop on Windows to use WSL2 backend, all changes like this should be undone to avoid collisions.
This applies to this private build as well as official releases that should be available soon.

@Henriquepb22
Copy link

Henriquepb22 commented Feb 20, 2020

Thanks @StefanScherer, i will undo everything now, im also getting this error when trying to create and run a container:

docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.
i think its related to that, if not there's a fix for that?

Edit: Actualy fixed that error by undoing everything from https://github.com/LongLiveCHIEF/wsl2-docker-for-win and turning ON and OFF the "Enable Integration with my default WSL distro" option on DockerDesktop in Configs/Resources/WSL Integration

@jkonowitch
Copy link

jkonowitch commented Mar 4, 2020

This has been released to Edge. I believe this issue can be closed. Thanks, Docker team!

@StefanScherer
Copy link
Member

@jkonowitch Correct. Windows 10 Home Insider users can download Docker Desktop Edge 2.2.2.0 or higher from https://hub.docker.com/editions/community/docker-ce-desktop-windows/ and use the WSL2 backend.
This will land in Stable release later this year after Windows 10 2004 has been released.

@franciscosuca
Copy link

Just to let you know, I installed wsl2 in Windows 10 Home, with distro Kali Linux, by using a simple apt-get install docker && service docker start I was able to use docker (build and run), I haven't tested the network functionality yet. Regards to RAM consume, it is pretty similar to the VPS with Linux model used by Docker for Windows, the main difference, is the boot time, super fast.

Actually it did not work for me, but instead I was able to run it on WSL2 (probably after the 20.04 update).

  • Follow the regular installation process for docker here.
  • Check that docker was installed successfully:
    service --status-all
  • If you see docker among the list, then start the service:
    service docker start

@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.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 9, 2020
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