-
-
Save santaklouse/85b72a9c366d0b950d347d3020367320 to your computer and use it in GitHub Desktop.
Running GUI application in Docker on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install XQuartz | |
brew cask install xquartz | |
# Restart MacOS | |
# Open XQuartz | |
open -a XQuartz | |
# Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on | |
# Add localhost as an allowed source | |
xhost + 127.0.0.1 | |
# Run a Docker container, e.g. Firefox | |
docker run -e DISPLAY=host.docker.internal:0 -v /tmp/.X11-unix:/tmp/.X11-unix jess/firefox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment