Docker Community Forums

Share and learn in the Docker community.

Docker chrome headfull with Xvfb and remote debugging active (dbus)

Hello, for a few days, I have been digging into this subject without success. After some research hours, I ended up finding someone who managed to start a chrome head-full but got stuck on enabling remote debugging, probably linked to dbus error.

I think I’m reaching my limit, I was just wondering if some had succeeded in this?

Here is where I am for the moment: remote-debugging · Issue #26 · siomiz/chrome · GitHub

Using this image alpeware/chrome-headless-trunk worked for me in ubuntu! The command used in that container to launch headless chrome is this:

/usr/bin/google-chrome-unstable \
--disable-gpu --headless --no-sandbox \
--remote-debugging-address=0.0.0.0 \
--remote-debugging-port=9222 --user-data-dir=/data

here’s a short video of the container in action chrome headless in action

I launched the container in Ubuntu with this command:

 docker run -it --rm -p=0.0.0.0:9222:9222 \ 
 --name=chrome-headless \
 -v /tmp/chromedata/:/data alpeware/chrome-headless-trunk

then used Chrome to connect to the debug port at localhost:9222

With some modifications you could probably get this running in Jenkins !

Sources

Hello @lewish95 ! thank you for your time and the feedback, the goal with xfvb is precisely to run the chrome in non-headless :), in “headfull”. This is the difficult point actually in headless the containers work well :slight_smile: