-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish Docker image that includes a browser #2914
Comments
I think it's a good idea to publish a k6 Docker image that includes a browser, but it should definitely be a separate image from the current UPDATE: I just did a quick test adding So yeah, definitely as a separate image, maybe |
Thanks Ivan for the quick investigation! A separate docker image sounds like the best option 👍🏼 |
Having a separate image (or even the same one, but with a separate tag) with browser installed and k6 browser module enabled might be a good idea. This way users explicitly opt in for using browser API in their tests, so no unexpected process launches. |
I guess in that case you can even by default set |
I'd like to add a finding that might affect this or other docker images that we push to docker hub. We can run the docker image directly from command line such as: docker run -v /path/to/tests/on/host/k6:/path/to/tests/in/docker/k6 grafana/k6:latest run /path/to/tests/in/docker/k6/my-super-test.js If i now try running a browser test with something like this:
We get the expected If i now try to create a new image based on FROM grafana/k6:0.43.0
USER root
RUN apk update && apk add --no-cache chromium
ENV K6_BROWSER_ENABLED=true Build with Run the test with I get This only happens on mac on arm. It has been tested on ubuntu non arm and it works. So:
|
@ankur22 I think it's because the There are ways of building multi-platform images, but I think we don't need to publish a separate ARM image, and you should be able to use the original image if you pass |
I tried that, with no luck. I agree that it does seem to be a bit too much to upload an image for different OS/Arch. I may do a bit more digging though. Thanks for the advice 👍 |
+1 for k6 Dockerfile with a browser Currently, there doesn't seem to be a Dockerfile that can be used for k6 browser-based testing. Adding browser support manually similar to xk6-browser Dockerfile has compatibility issues/errors within k6 core. It would be great to have a k6 core Dockerfile with a browser option |
As per this conversation, The k6 Docker doesn't include Chromium so if someone wants to use grafana/k6 directly, they won't be able to run browser tests.
There is an example Dockerfile from xk6-browser so I think we also need a similar one for k6.
I'm not sure what the best way forward so raising this as an issue as we believe this needs more discussion with the k6-core side.
The text was updated successfully, but these errors were encountered: