How to run k6 browser via docker in v0.43.0?

Hi @f.gardin

The problem that you are facing is because, even though xk6-browser is now included in k6 as an experimental module, the current k6 Docker image does not include a browser, therefore the launch command is failing to start such process. There is an issue created in order to bundle a browser in the k6 Docker image that you can track here.

By now I think this Dockerfile example can help you build an image for latest k6 release including chromium browser:

FROM grafana/k6:0.43.1
USER root

RUN apk update && apk add --no-cache chromium

ENV K6_BROWSER_ENABLED=true
3 Likes