Using libcef within docker

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Using libcef within docker

Postby aleitner » Wed Oct 25, 2023 11:54 am

Context:
* We are developing an application that is using CEF to render the contents of a web page remotely. As such, we are interested in ensuring that changes to the browser display are as efficient as possible in terms of the size of the region(s) of the display updated during any particular frame.
* This application will commonly be run within a Docker container.

How can a CEF-driven application be run safely under Docker (ideally without the container itself being privileged)?
Currently, CEF appears to always attempt to connect to local D-Bus and X11 services, and fails when these resources are not available. It also requires elevated privileges in order to drop those same privileges later.

How might CEF be run in a truly headless environment, ideally without a dependency on any secondary services, and how might it be run without requiring elevated privileges?
aleitner
Techie
 
Posts: 49
Joined: Fri Jun 16, 2023 12:05 pm

Re: Using libcef within docker

Postby magreenblatt » Wed Oct 25, 2023 1:16 pm

How can a CEF-driven application be run safely under Docker (ideally without the container itself being privileged)?

We currently run CEF applications via xvfb-run using this docker configuration. Much of that configuration is related to building CEF/Chromium and may not be required for your particular use case.

how might it be run without requiring elevated privileges?

You can look at the sandboxing options that Chromium provides for Linux systems. It will be the same for CEF.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 137 guests