Run Chromium inside container: libGl error

ⅰ亾dé卋堺 提交于 2019-12-10 13:14:42

问题


I'm trying to run Chromium inside docker container. Here's the output I get:

Created new window in existing browser session.
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: vmwgfx

I've searched a lot on the internet about this issue but cannot find anything clear. Do you have any suggestions on how can I solve this problem ?

Thank you in advance.


回答1:


As Mark Wragg wrote in a comment; this guide from wiki.ros.org is pretty good

It seems like you're missing the vmwgfx GL drivers, at mesa3d.org you can see how to install them.

Myself ran into this issue after all drivers was installed, but then I found out that I also need to mount the graphic card to the docker container. For Intel cards that's made with

docker run --device=/dev/dri:/dev/dri ...

For other graphic cards I recommend the guide from wiki.ros.org




回答2:


Do you realize that you can run as may unrelated instances of Chromium if you like with the --user-data-dir= option?

 chromium-browser --user-data-dir=/tmp/chrome1

Or

 chromium-browser --user-data-dir=`mktemp` &
 chromium-browser --user-data-dir=`mktemp` &
 chromium-browser --user-data-dir=`mktemp` &

The additional isolation that docker brings is thin compared to the security and isolation baked into Chrome.



来源:https://stackoverflow.com/questions/42438619/run-chromium-inside-container-libgl-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!