Building images
What’s inside an image
Section titled “What’s inside an image”Each image consists of three layers:
- Base layer — the things every image needs: Xvfb, fonts, locales, the cursor blinking fix, timezone definition and so on. Built once and shared.
- Browser layer — the browser binary.
- Driver layer — the matching WebDriver binary.
Building procedure
Section titled “Building procedure”The procedure is automated by a Go binary with all Docker build files embedded. To build it from source:
go buildTo show help:
./images --help./images firefox --helpBefore building you can optionally clone the tests repository next to this one:
git clone https://github.com/WebSummoner/websummoner-container-tests.gitimages/ # this repowebsummoner-container-tests/ # optional tests repoThen add --test to run the suite against the image you just built.
Firefox
Section titled “Firefox”./images firefox -b 155.0~build1 -t websummoner/firefox:155.0.0Omit -d (or pass latest) to take the newest matching geckodriver.
Chrome
Section titled “Chrome”./images chrome -b 152.0.7977.75-1 -d latest -t websummoner/chrome:152.0Microsoft Edge
Section titled “Microsoft Edge”./images edge -b 152.0.4191.62-1 -d 152.0.4191.62 -t websummoner/edge:152.0./images opera -b 135.0.5973.76 -t websummoner/opera:135.0Do 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.
Yandex Browser
Section titled “Yandex Browser”./images yandex -b 26.6.1.1083-1 -t websummoner/yandex:26.6./images brave -t websummoner/brave:1.94Brave’s line is major.minor; the tool detects the embedded Chromium from the built image and fetches the matching chromedriver.
WebKit (Safari)
Section titled “WebKit (Safari)”./images safari -t websummoner/safari:2.52.6Building from a local package
Section titled “Building from a local package”Replace the package version with a path to a .deb:
./images firefox -b /path/to/firefox_155.0_amd64.deb -t websummoner/firefox:155.0.0The file name must contain the full version — the tool derives the browser version by parsing it.
Pushing
Section titled “Pushing”Add --push to push after building:
./images chrome -b 152.0.7977.75-1 -t websummoner/chrome:152.0 --pushSelecting a browser channel
Section titled “Selecting a browser channel”Besides the default stable channel:
| Browser | Channel | Package |
|---|---|---|
| firefox | beta | firefox (PPA) |
| firefox | dev | firefox-trunk (PPA) |
| firefox | esr | firefox-esr (PPA) |
| chrome | beta | google-chrome-beta |
| chrome | dev | google-chrome-unstable |
| opera | beta | opera-beta |
| opera | dev | opera-developer |
./images firefox -b <version> --channel dev -t websummoner/firefox:dev