I'm running selenium tests on headless firefox inside docker. For that I have installed firefox and Xvfb inside docker and export display using Xvfb command when I run the container.
The issue is, when I run the docker container locally, selenium is able to find the display but when I run the docker container on Jenkins it's giving "GDK_BACKEND does not match available displays"
For Xvfb I do
sh "export DISPLAY=:1"
sh "Xvfb :1 -screen 0 1440x900x24 &"
I checked available displays just before starting my test case using "ps aux | grep X". Below is the output
root 31 0.0 0.4 172336 18644 ? Sl 16:36 0:00 Xvfb :1 -screen 0 1440x900x24
root 147 0.0 0.0 12812 980 ? S 16:36 0:00 grep X