Build the docker image and start the container.
Start Xvfb
in the container via
$ /etc/init.d/xvfb start
Run Chrome with working WebGL in kiosk mode
$ google-chrome \
--no-first-run \
--user-data-dir=/tmp/chrome \
--no-sandbox \
--enable-logging=stderr \
--use-gl=osmesa \
--app=<some-url>
Open another shell into the container and take a screenshot:
$ import -window root screenshot.png
😎 Profit.