cypress-docker-images
cypress-docker-images copied to clipboard
Add Arm browsers to `linux/arm64` Docker images
Currently, the browsers
and included
image series do not ship with any browsers except --browser electron
. The blocker is the lack of official support from browser vendors.
Users must manually find and install other Arm builds in order to use non-Electron browsers with the linux/arm64
images.
As browser vendors make official Arm builds available, Cypress should update existing linux/arm64
images to include them.
Upstream tracking issues:
- Google Chrome Linux arm64 support: https://crbug.com/677140
- Mozilla Firefox Linux arm64 support: https://bugzilla.mozilla.org/show_bug.cgi?id=1678342
- Microsoft Edge Linux arm64 support: https://techcommunity.microsoft.com/t5/discussions/edge-for-linux-arm64/m-p/1532272
does cypress/base:14.7.0 support arm/64
arch ? if not is any of the base images does ? I always see the warning that IMAGE MAY HAVE POOR PERFORMANCE, OR FAIL, IF RUN VIA EMULATION
when trying to run a container which has base image from cypress
@Elwazer007 none of the cypress images do yet. but look out for #700 to merge soon and close #431
Why not include chromium? Chromium has a package for ARM on linux.
@FarhanShoukat I recommend building a Docker image off of our images that includes Chromium. We chose not to ship an Arm image with Chromium for a few reasons:
a. It would require users to use a different invocation on Arm vs. on non-Arm (--browser chromium
vs --browser chrome
).
b. This issue is a temporary condition, that will be resolved once upstream browser vendors build for Arm, at which point we will re-issue the browsers
images on Arm.
c. It's not difficult for users to build their own images that include Chromium if they really need to test on a non-Electron browser on M1/other Arm environments.
@flotwig thank you for your response. I have already built my based on node. It made sense because I don't really extra stuff like electron. It was just a suggestion that maybe have an image with Chromium as well. We already have images with Chrome, Firefox and Edge. Chromium would a good addition in my opinion.
But why not use Chromium instead of Google Chrome everywhere ?
With our new cypress/factory pattern we could add a chromium install script but not install it by default in the browsers image to avoid making the cypress/browsers or cypress/included images larger.
I'd definitely be open to a contribution on this.
Seems running with --platform linux/amd64
helps. Read more there: https://docs.docker.com/build/building/multi-platform/
@deser could you elaborate on how you got that to work with --plaftorm linux/amd64
? Do you mean you were able to run cypress/included
x64 containers on an ARM host/workstation?
I have a few colleagues who'd like to run this on an M1 mac and get a segfault.
I also need chrome for arm architecture, any progress?
@nejch I got Chrome to run on an M1 Mac by enabling Rosetta 2 emulation and using --platform linux/amd64
.
Install Rosetta 2 with softwareupdate --install-rosetta
Enable Rosetta emulation by following these instructions
Start a container docker run --rm --platform linux/amd64 cypress/included:latest --e2e --browser chrome
But why not use Chromium instead of Google Chrome everywhere ?
I don't think this question has been adequately answered. I would understand the argument that Chromium is too much of a burden if it's only going to be a stopgap, but why shouldn't it replace Chrome permanently?
Google themselves say that you shouldn't use Chrome for testing. (ignore the fact that they recommend their new tool, Chrome for Testing, instead of Chromium 😄 )
b. This issue is a temporary condition
@flotwig how temporary is temporary when this issue has already been opened for a year with no fix in sight?
Any update on this issue?
It's YEAR 4202 now! Any workaround here?
FROM cypress/factory
ARG NODE_VERSION='20.9.0'
WORKDIR /e2e
RUN apt update && apt install -y chromium
RUN npm install --save-dev cypress
Works for me on M2 to run in Chromium.