Skip to content

Building images

Each image consists of three layers:

  1. Base layer — the things every image needs: Xvfb, fonts, locales, the cursor blinking fix, timezone definition and so on. Built once and shared.
  2. Browser layer — the browser binary.
  3. Driver layer — the matching WebDriver binary.

The procedure is automated by a Go binary with all Docker build files embedded. To build it from source:

Terminal window
go build

To show help:

Terminal window
./images --help
./images firefox --help

Before building you can optionally clone the tests repository next to this one:

Terminal window
git clone https://github.com/WebSummoner/websummoner-container-tests.git
images/ # this repo
websummoner-container-tests/ # optional tests repo

Then add --test to run the suite against the image you just built.

Terminal window
./images firefox -b 155.0~build1 -t websummoner/firefox:155.0.0

Omit -d (or pass latest) to take the newest matching geckodriver.

Terminal window
./images chrome -b 152.0.7977.75-1 -d latest -t websummoner/chrome:152.0
Terminal window
./images edge -b 152.0.4191.62-1 -d 152.0.4191.62 -t websummoner/edge:152.0
Terminal window
./images opera -b 135.0.5973.76 -t websummoner/opera:135.0

Do not pass -d for Opera. operachromiumdriver tags follow the Chromium version Opera is built on, not Opera’s own line, so the tool resolves it — see Opera.

Terminal window
./images yandex -b 26.6.1.1083-1 -t websummoner/yandex:26.6
Terminal window
./images brave -t websummoner/brave:1.94

Brave’s line is major.minor; the tool detects the embedded Chromium from the built image and fetches the matching chromedriver.

Terminal window
./images safari -t websummoner/safari:2.52.6

Replace the package version with a path to a .deb:

Terminal window
./images firefox -b /path/to/firefox_155.0_amd64.deb -t websummoner/firefox:155.0.0

The file name must contain the full version — the tool derives the browser version by parsing it.

Add --push to push after building:

Terminal window
./images chrome -b 152.0.7977.75-1 -t websummoner/chrome:152.0 --push

Besides the default stable channel:

BrowserChannelPackage
firefoxbetafirefox (PPA)
firefoxdevfirefox-trunk (PPA)
firefoxesrfirefox-esr (PPA)
chromebetagoogle-chrome-beta
chromedevgoogle-chrome-unstable
operabetaopera-beta
operadevopera-developer
Terminal window
./images firefox -b <version> --channel dev -t websummoner/firefox:dev