7

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.

wonderingdev
  • 1,132
  • 15
  • 28
  • 2
    I found a Git issue that suggested the issue might be that you need to enable hardware acceleration for your docker container. See if this guide helps: http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration – Mark Wragg Feb 24 '17 at 12:28
  • Maybe not related to your question but you could be interested in [headless-chrome](https://developers.google.com/web/updates/2017/04/headless-chrome). – j2ko Jun 27 '18 at 10:13

2 Answers2

7

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

kontrollanten
  • 2,649
  • 19
  • 32
-3

If it's for isolation, you can achieve something practically similar by running as may unrelated instances of Chromium as 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.

dagelf
  • 1,468
  • 1
  • 14
  • 25