cypress-docker-images
cypress-docker-images copied to clipboard
Create a cypress/alpine minimal image
Hi 👋
Thanks a lot for all these Docker images! I noticed the discussion around image size: https://github.com/cypress-io/cypress-docker-images/pull/83 and was wondering whether there might be a chance to create a cypress Docker image based on node:alpine or node:slim?
In this way, we would have:
Image | Default | Description |
---|---|---|
cypress/base | cypress/base:8 | All system dependencies, no browsers. |
cypress/browsers | cypress/browsers:chrome67 | All system dependencies and browser(s). |
cypress/included | cypress/included:3.2.0 | All system dependencies and the Cypress test runner installed globally. |
cypress/alpine | cypress/alpine:1.0.0 | All system dependencies and the Cypress test runner installed globally. |
For my current use case, I'm building Cypress Docker images in my CI pipeline that are pulled onto an on-premise CentOS system. Unfortunately, the corporate VPN really slows things down, so pulling a 1GB image for 20+ deployments & tests each day takes too long :(
Knowing that Cypress needs a lot of dependencies like libgtk2.0-0
etc., we probably need to see if all of that can be achieved easily on alpine!
Before I do any work on this, it'd be great to know if anyone has looked into this already?
Thanks 🙏
+1. Its good to have a small image when we run tests in our CI.
+1. Would love to see this happening!
Has anybody tried to do this yet? If so, I'd be interested how far you got.
Has anybody tried to do this yet? If so, I'd be interested how far you got.
Go for it @sebinsua 🚀 Sorry, I haven't had much time in the last months, otherwise I would have started on it already.
On that note, I'd also be curious to hear @bahmutov's thoughts on this issue!
Happy Sunday ☀️
Great idea. Is anyone working on it?
This would be very nice since I am getting 1.6 GB images for pipeline and that is a lot.
👍 for an Alpine image. The Debian image is large and unzipping Cypress alone takes minutes to complete.
an alpine
based image would be great to have. 👍
currently our cypress
image is the only one we run on k8s that has vulnerabilities. And basing an image on debian
is known to come with unresolved vulnerabilities: https://github.com/docker-library/buildpack-deps/issues/46
I would love a smaller image as well. I think the issue is that chrome electron does not support alpine.
Would also like to see this happen - and willing to help.
My use case is testing a web app with Firebase Emulators running in the background. For this purpose, I have an (Alpine based) firebase-ci-builder image that takes care of the emulators.
Since I want to run Cypress tests in CI as well, am in a cross roads:
- should I make a
cypress/base
+ JVM + Firebase Emulators image for the front end tests (likely the sensible way) - get Cypress running on Alpine, in which case I could expand the above custom image, by pouring Cypress on top (the right way)
Hi everybody Any update on this?
Hello, is there any update here?
#597 introduced bullseye-slim
as the current base image for all Cypress images. There is no plan currently by the Cypress team to create an alpine
-based image.
If one of your main new features is Cypress Component Testing
have in mind the developers generally use small images to develop.
The large issue here is that chrome doesn't support alpine (not sure if firefox or edge does either). As mentioned above we do use bullseye-slim
and with our cypress/factory image you could further slim down the image by choosing which browsers you want to install.
I think it would be possible to make a node + cypress alpine image, but i haven't tried that combination. When making the cypress/factory docker image, i did try to go with alpine but as soon as i realized that chrome wasn't available, I went back to bullseye-slim in order to support as many browsers as possible.
I'd be open to a contribution, think docker/factory-alpine, but the maintenance costs would have to be pretty low for us to continue to support it.
Would this project be helpful? https://github.com/Zenika/alpine-chrome ?
I would love a smaller image as well. I think the issue is that chrome electron does not support alpine.
firefox seems to, which would be a start: https://pkgs.alpinelinux.org/package/edge/community/x86/firefox