cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1k stars 376 forks source link

Feature Branch Request #1111

Closed pmaidens closed 3 weeks ago

pmaidens commented 3 weeks ago

Requesting a feature branch named 12.17.4-node-20.14.0-publish as per the contributing docs.

I need to create a docker image similar to the cypress/browsers:node14.19.0-chrome100-ff99-edge image with the node version being 20.14.0. I need the browser versions to be the old ones. I do not need cypress pre-installed on the image, but it seems that the feature branch name doesn't account for that.

Please let me know if there is any other information you need, or any actions I need to take before feature branch creation.

Thanks!

MikeMcC399 commented 3 weeks ago

@pmaidens

I understand that you want to generate a Cypress Docker image cypress/browsers with Node.js 20.14.0 LTS combined with older browser versions, similar to cypress/browsers:node14.19.0-chrome100-ff99-edge

Could you please clarify if this is for your own use (or your organization's use), or if you believe that this combination of versions is going to be useful for the wider Cypress community? Your answer will help to provide better advice for your options and next steps.

Only a limited history of older versions of Chromium-based browsers (Chrome and Edge) are kept on the distribution sites, so there are restrictions on how far back in time you can go using the cypress/factory process. (Firefox continues to provide the full historical library of previous and current versions.)

pmaidens commented 3 weeks ago

This is just for my own use. I don't think there will be a large demand from the wider community. I am trying to test if some variance is caused by the node version upgrade or the browser version upgrade.

I see. I noticed that the distribution sites that were linked in the docs no longer had the versions I was looking for. I didn't know if that would cause a problem or not.

Based off of the other avenues that I have been looking at, would my best course of action be to create a new docker image with the base image being cypress/browsers:node14.19.0-chrome100-ff99-edge and then update the node version manually on the container when it is running?

MikeMcC399 commented 3 weeks ago

@pmaidens

The supported way would be to follow the instructions in factory, for instance:

Create a Dockerfile with old available Browser versions

ARG CHROME_VERSION='117.0.5938.62-1'
ARG EDGE_VERSION='114.0.1823.43-1'
ARG FIREFOX_VERSION='99.0.1'

FROM cypress/factory

COPY . /opt/app
WORKDIR /opt/app
RUN npm install cypress --save-dev
RUN npx cypress install

then to test against Chrome for example:

docker build . -t test
docker run -it --rm test npx cypress run -b chrome

cypress/browsers:node14.19.0-chrome100-ff99-edge was built using a different process and is now unsupported. You may run into issues which have already been solved in later versions of Cypress Docker images, so if you base anything on this you would be on your own.

pmaidens commented 3 weeks ago

OK, cool. Thanks for the help!