Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用docker for Mac的实时Webkit Splash窗口_Docker_Splash Screen - Fatal编程技术网

使用docker for Mac的实时Webkit Splash窗口

使用docker for Mac的实时Webkit Splash窗口,docker,splash-screen,Docker,Splash Screen,各位开发者好 我在试图使Mac中的live Webkit窗口正常工作时遇到问题,我尝试使用官方文档中发布的代码: docker run -e DISPLAY=unix$DISPLAY -v /Users/emilianoisaza/Desktop/crawlers/splash/Luascripts:/notebooks -v $XAUTHORITY:$XAUTHORITY -e XAUTHORITY=$XAUTHORITY -p 8888:8888 -it scrapinghub/sp

各位开发者好

我在试图使Mac中的live Webkit窗口正常工作时遇到问题,我尝试使用官方文档中发布的代码:

docker run -e DISPLAY=unix$DISPLAY 
-v /Users/emilianoisaza/Desktop/crawlers/splash/Luascripts:/notebooks
-v $XAUTHORITY:$XAUTHORITY 
-e XAUTHORITY=$XAUTHORITY 
-p 8888:8888 
-it scrapinghub/splash-jupyter --disable-xvfb

我知道它是为linux编写的,但我失败得很惨。我是docker的新手,非常感谢您的帮助

我已经尝试并搜索了很多方法,终于成功了。 这个问题类似于

使用Docker for Mac运行GUI应用程序

步骤:

1.使用以下链接安装XQuartz

2.运行XQuartz

3.主机IP

ifconfig en0 | grep inet | awk '$1=="inet" {print $2}'

export DISPLAY=192.168.199.193:0.0
xhost +

4.运行容器

docker run -v `/bin/pwd`/notebooks:/notebooks -e DISPLAY=$DISPLAY -p 8888:8888 -it scrapinghub/splash-jupyter --disable-xvfb
它起作用了

  • 参考: