IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    How to run GUI app in docker on osx

    五四陈科学院发表于 2017-07-27 10:11:29
    love 0

    以下内容由[五四陈科学院]提供

    This is a quick guide explaining how to run GUI app in docker on mac osx.

    step 1.install two important tools

    #brew cask install xquartz
      
      #brew install socat

    step 2.run socat

    socat TCP-LISTEN:6001,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &

    step 3.see what your real en* by ifconfig

    #ifconfig

    You can see en0 en1 en2 and so on,choose a right one which has the right IP addrass.

    step 4.run docker

    docker run -it -e XAUTHORITY=/tmp/xauth -v ~/.Xauthority:/tmp/xauth -e DISPLAY=$(ifconfig en3 | grep 'inet '|awk '{print $2}'):1 --net host --volume=$(pwd):/workspace fastercnn /bin/bash

    attention: You must modify the DISPLAY,replace the “ifconfig en*” by the one which choosed in step 3.

    Good luck!


    想快点找到作者也可以到weibo上留言: @54chen
    或者你懒得带上,请到新浪微博:@54chen


沪ICP备19023445号-2号
友情链接