Skip to content
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

Create a cypress/alpine minimal image #110

Closed
tobiasbueschel opened this issue May 16, 2019 · 21 comments
Closed

Create a cypress/alpine minimal image #110

tobiasbueschel opened this issue May 16, 2019 · 21 comments

Comments

@tobiasbueschel
Copy link

Hi 👋

Thanks a lot for all these Docker images! I noticed the discussion around image size: #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 🙏

@chisma
Copy link

chisma commented Jul 23, 2019

+1. Its good to have a small image when we run tests in our CI.

@Khazl
Copy link

Khazl commented Sep 25, 2019

+1. Would love to see this happening!

@sebinsua
Copy link

sebinsua commented Nov 7, 2019

Has anybody tried to do this yet? If so, I'd be interested how far you got.

@tobiasbueschel
Copy link
Author

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 ☀️

@idosal
Copy link

idosal commented Nov 24, 2019

Great idea. Is anyone working on it?

@archfz
Copy link

archfz commented Dec 2, 2019

This would be very nice since I am getting 1.6 GB images for pipeline and that is a lot.

@JasonThomasData
Copy link

👍 for an Alpine image. The Debian image is large and unzipping Cypress alone takes minutes to complete.

@jeff-knurek
Copy link

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: docker-library/buildpack-deps#46

@Romiko
Copy link

Romiko commented Nov 15, 2020

I would love a smaller image as well. I think the issue is that chrome electron does not support alpine.

@akauppi
Copy link

akauppi commented Jun 6, 2021

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)

@fescobar
Copy link

fescobar commented Jun 4, 2022

Hi everybody
Any update on this?

@guifeliper
Copy link

Hello, is there any update here?

@admah
Copy link
Contributor

admah commented Jun 29, 2022

#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.

@fescobar
Copy link

If one of your main new features is Cypress Component Testing have in mind the developers generally use small images to develop.

@mjhenkes
Copy link
Member

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.

@liam-verta
Copy link

Would this project be helpful? https://github.com/Zenika/alpine-chrome ?

@SIGSTACKFAULT
Copy link

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

@MikeMcC399
Copy link
Collaborator

@tobiasbueschel

Could you please clarify if you feel that this request needs to stay open?

So that:

@MikeMcC399
Copy link
Collaborator

The original subject "Create a cypress/alpine minimal image" is not currently feasible.

Images are already based on slim variants.

@MikeMcC399 MikeMcC399 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
@Dentrax
Copy link

Dentrax commented Jun 29, 2024

Hey @MikeMcC399, could you please explain a bit and clarify why it is currently "not feasible"? Are there any blockers?

cypress/included image currently has 7 critical, 58 high, 69 medium, 22 low CVEs due to base image.

@MikeMcC399
Copy link
Collaborator

@Dentrax

could you please explain a bit and clarify why it is currently "not feasible"? Are there any blockers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.