Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

Run Docker-OSX directly in powershell

Open KernelInterrupt opened this issue 1 year ago • 1 comments

Actually, we can simply run Docker-OSX on WSL2 without getting into distros (just using PowerShell),and it fixed issue #430. Let me explain that: When using Docker Desktop on windows,it created two speical distros called docker-desktop and docker-desktop-data In other distros,Wslg is in /mnt/wslg But in docker-desktop,Wslg is in /mnt/host/wslg What is worse is that the container actually boot in docker-desktop-data,and then /mnt in docker-desktop was mounted to /run/desktop in docker-desktop-data. Therefore,we actually need to mount /run/desktop/mnt/host/wslg/.X11-unix to /tmp/.X11-unix to get video output.

KernelInterrupt avatar May 28 '24 06:05 KernelInterrupt

Let me explain more: When executing command in Powershell,the existing commands actually mount a non-existent path to /tmp/.X11-unix ,which causes errors like gtk initialization failed .By changing the path(/mnt/host/wslg/.X11-unix -> /run/desktop/mnt/host/wslg/.X11-unix ),we can mount Wslg in docker-desktop to /tmp/.X11-unix to get video output.

KernelInterrupt avatar May 29 '24 08:05 KernelInterrupt