Skip to content
hekra01 edited this page Feb 10, 2017 · 25 revisions

QtWebDriver can be deployed using this Dockerfile.

Pull

The latest image is available on Dockerhub.

$ docker pull hekra01/qtwebdriver

Run

The usual WebDriver command line parameters are accepted by the container.

By default the container runs QtWebdriver:

  • on the default port 9517
  • in headless mode (QT_QPA_PLATFORM=offscreen).

To run in headed mode unset QT_QPA_PLATFORM, see Example 3 below.

Examples

  • Example 1: Run headless QtWebDriver in verbose mode on the default webdriver port 9517 and map to host port 9530.
$ docker run -tid -p 9530:9517 hekra01/qtwebdriver:latest --verbose
  • Example 2: Run headless QtWebDriver in verbose mode on port 9520 and map to host port 9530.
$ docker run -tid -p 9530:9520 hekra01/qtwebdriver:latest --port 9520 --verbose
  • Example 3: Run headed (GUI is visible) QtWebDriver in verbose mode on port 9520 and map to host port 9530.
$ xhost +
$ docker run -tid -p 9530:9520 -e QT_QPA_PLATFORM= -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix hekra01/qtwebdriver:latest --port 9520 --verbose
  • Example 4: Run headless QtWebDriver in verbose mode, with web inspector on default ports (resp. port 9517 and 9222).
$ docker run -tid -p 9517:9517 -p 9222:9222 hekra01/qtwebdriver:latest --verbose --wi-server
Clone this wiki locally