Credit for making it possible.
https://github.com/sickcodes/Docker-O...
Docker-OSX with WSL (Windows Subsystem for Linux)
1. Install WSL on Windows 10
2. Add nestedVirtualization=true to the end of the file (If the file doesn't exist, create it).
C:/Users/Your_Name/.wslconfig and kvm-ok command to check Nested Virualization
3. Download and install Docker for Windows
4. Ensure x11-apps is installed. Use the command:-
sudo apt install x11-apps -y
5. Finally Run Docker command to run macos
docker run -i \
--device /dev/kvm \
-p 5999:5999 \
-p 5998:5998 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
-e EXTRA="-display none -vnc 0.0.0.0:99,password=on" \
sickcodes/docker-osx:big-sur
6. Vnc password and re-running docker after stopping
type `change vnc password sonooskb` into the docker terminal and set a password
docker start -a -i `docker ps -q -l`
VNC Viewer Download link
https://www.realvnc.com/en/connect/do...
WSL installation steps:-
1.Make sure you have both windows for subsystem feature and virtual machine feature enable, command line are the following
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
one for Enable the Windows Subsystem for Linux
another for Enable Virtual Machine feature
2. Then use the link the download the update and install (latest)
https://wslstorestorage.blob.core.win...
3. reboot
gtk initialization failed