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

Run Docker-OSX directly in powershell #774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KernelInterrupt
Copy link

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
Copy link
Author

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.

Copy link

@5E7EN 5E7EN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. Solves "gtk initialization failed" errors.

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

Successfully merging this pull request may close these issues.

2 participants