This is a base Dockerfile to create Webdriver Docker images.
Usage
The base image runs a given command in a virtual X Window System:
docker run blueimp/basedriver COMMAND
As the base image is not every useful by itself, please refer to the following projects, which extend the image with Webdriver servers:
- blueimp/chromedriver (Chrome Webdriver)
- blueimp/geckodriver (Firefox Webdriver)
Software
The following software is included in the blueimp/basedriver image:
- Debian base image (bullseye-slim)
- Xvfb as virtual display server
- Fluxbox as lightweight window manager
- rxvt-unicode as lightweight terminal emulator
- x11vnc for remote access via VNC
- curl to download additional software
Configuration
Docker containers based on this image can be configured with the following environment variables (listed are the default values):
# Virtual screen width: SCREEN_WIDTH=1440 # Virtual screen height: SCREEN_HEIGHT=900 # Virtual screen color depth: SCREEN_DEPTH=24 # X11 DISPLAY variable (hostname:display.screen): DISPLAY=:0 # Set to true to disable the X Window Server: DISABLE_X11= # Set to true to expose the X Window Server via TCP: EXPOSE_X11= # Set to true to enable the VNC server: ENABLE_VNC= # VNC server port: VNC_PORT=5900 # VNV access password: VNC_PASSWORD=secret
Please note:
The X11 port number is inferred from the display number (defined by the
DISPLAY variable) plus 6000, which defaults to port 6000.
License
Released under the MIT license.