Skip to content

Commit 1380481

Browse files
authored
Merge pull request sickcodes#422 from kimjammer/patch-2
2 parents 89d4aa6 + d435c06 commit 1380481

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

README.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -488,52 +488,59 @@ sudo modprobe kvm
488488

489489
### I'd like to run Docker-OSX on Windows
490490

491-
Running Docker-OSX on Windows is now possible using WSL2 (Windows 10/11 + WSL Subsystem).
491+
Running Docker-OSX on Windows is possible using WSL2 (Windows 11 + Windows Subsystem for Linux).
492492

493-
Before continuing, you have to check your Windows 10 versione, in fact you need 20175 build or higher. If you are on Windows 11 you can continue it without care about your version.
493+
You must have Windows 11 installed with build 22000+ (21H2 or higher).
494494

495-
Ensure you have enabled the features on your Windows. Search on start "Turn Windows Features on or off" and check these checkbox:
495+
First, install WSL on your computer by running this command in an administrator powershell. For more info, look [here](https://docs.microsoft.com/en-us/windows/wsl/install).
496496

497+
This will install Ubuntu by default.
497498
```
498-
Windows Subsystem For Linux
499-
Windows Hypervisor Platform
500-
Virtual Machine Platform
499+
wsl --install
501500
```
502501

503-
Enabling all the options above, you will have WSL on your Windows OS and the third party application for virtualization like VMWare, VBox, etc...
502+
You can confirm WSL2 is enabled using `wsl -l -v` in PowerShell. To see other distributions that are available, use `wsl -l -o`.
504503

505-
After that, you need to have a version 2 WSL Distro installed, check [this link to upgrade from WSL1 to WSL2](https://docs.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2) in case you have already installed WSL Distro.
504+
If you have previously installed WSL1, upgrade to WSL 2. Check [this link to upgrade from WSL1 to WSL2](https://docs.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
506505

507-
After WSL installation, go to C:/Users/<Your_Name>/ and add `nestedVirtualization=true` to the end of the file (If the file not exist, create it).
506+
After WSL installation, go to `C:/Users/<Your_Name>/.wslconfig` and add `nestedVirtualization=true` to the end of the file (If the file doesn't exist, create it). You may need to select "Show Hidden Files" and "Show File Extensions" in File Explorer options.
508507
The result should be like this:
509508
```
510509
[wsl2]
511510
nestedVirtualization=true
512511
```
513512

514-
Go to your WSL Distro and check if KVM is enabled by using `kvm-ok` command, the output should be like this:
513+
Go into your WSL distro (Run `wsl` in powershell) and check if KVM is enabled by using the `kvm-ok` command. The output should look like this:
515514

516515
```
517516
INFO: /dev/kvm exists
518517
KVM acceleration can be used
519518
```
520519

521-
It's time to download and install [Docker for Windows](https://docs.docker.com/desktop/windows/install/).
520+
Now download and install [Docker for Windows](https://docs.docker.com/desktop/windows/install/) if it is not already installed.
522521

523-
After installation, go to Setting and check these 2 checkbox:
522+
After installation, go into Settings and check these 2 boxes:
524523

525524
```
526525
General -> "Use the WSL2 based engine";
527-
Resources -> "Enable integration with my default WSL distro"
526+
Resources -> WSL Integration -> "Enable integration with my default WSL distro",
528527
```
529528

530-
Ensure `x11-apps` is installed, in case use the command `sudo apt install x11-apps -y`
529+
Ensure `x11-apps` is installed. Use the command `sudo apt install x11-apps -y` to install it if it isn't.
531530

532-
From now, you have 3 way to get video output:
531+
Finally, there are 3 ways to get video output:
533532

534-
- WSLg: is the one I use, actually is not perfect, ex. keyboard is not fully passthrough or you will see second mouse on the desktop! [Here the issue on WSLg](https://github.com/microsoft/wslg/issues/376)
535-
- Desktop Environment: this will give you a full linux desktop expirience but it will use a little bit of resources "RAM, CPU, GPU, etc..". I will attach an example guide but you will find a tons of guide to set a DE. [DE Example](https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/)
536-
- VNC: You can add -vnc argument to qemu and connect to your VM via VNC Client. [Here how to](https://wiki.archlinux.org/title/QEMU#VNC)
533+
- WSLg: This is the simplest and easiest option to use. There may be some issues such as the keyboard not being fully passed through or seeing a second mouse on the desktop - [Issue on WSLg](https://github.com/microsoft/wslg/issues/376) - but this option is recommended.
534+
535+
To use WSLg's built-in X-11 server, change these two lines in the docker run command to point Docker-OSX to WSLg.
536+
537+
```bash
538+
-e "DISPLAY=${DISPLAY:-:0}" \
539+
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
540+
```
541+
542+
- VNC: See the [VNC section](#building-a-headless-container-which-allows-insecure-vnc-on-localhost-for-local-use-only) for more information. You could also add -vnc argument to qemu. Connect to your mac VM via a VNC Client. [Here is a how to](https://wiki.archlinux.org/title/QEMU#VNC)
543+
- Desktop Environment: This will give you a full desktop linux experiencem but it will use a bit more of the computer's resources. Here is an example guide, but there are other guides that help set up a desktop environment. [DE Example](https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/)
537544

538545
## Additional boot instructions for when you are [creating your container](#container-creation-examples)
539546

0 commit comments

Comments
 (0)