Created
February 3, 2020 05:55
-
-
Save kawaz/b67c6b24bb6892960d06218e0d33c7c0 to your computer and use it in GitHub Desktop.
MacでDocker内のXアプリケーションを実行する手順
This file contains 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
# MacにXサーバを入れる(XQuartsの設定→セキュリティ→ネットワーククライアントからの接続を許可をチェックする) | |
brew cask install xquartz | |
# XQuarts で OpenGL を使えるようにする | |
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true | |
# デモ用のイメージを作成 | |
docker build -t xdemo -f <(echo $'FROM alpine\nRUN apk --no-cache add xeyes mesa-demos') . | |
# デモを実行してみる | |
docker run --rm -e DISPLAY=$(hostname):0 -v ~/.Xauthority:/root/.Xauthority xdemo xeyes | |
docker run --rm -e DISPLAY=$(hostname):0 -v ~/.Xauthority:/root/.Xauthority xdemo xeyes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment