Comments (10)
I think this is not worth doing. Because you still need to install other NPM dependencies, and you still would like to cache them, thus caching Cypress binary (as described here https://docs.cypress.io/guides/guides/continuous-integration.html#Caching-the-Cypress-Binary). CIs do a really good job caching folders, for example https://circleci.com/gh/cypress-io/cypress-example-recipes/6999 restores cached modules in 11 seconds and installs NPM modules in 12 seconds
So I
- don't see any performance gain from including Cypress binary in the docker image
- might cause version clash
- a lot of extra things to do and support
from cypress-docker-images.
from cypress-docker-images.
I'm thinking we would actually cache the last N number of releases.
from cypress-docker-images.
So now that the above linked feature has been added to Cypress maybe a quick win would be to just add npm install -g cypress
to the Dockerfiles so that the latest Cypress binary is baked in to the images?
from cypress-docker-images.
@ianwalter that would have devastating effects since users have a package.json
with a specific Cypress module version that is not compatible with the latest binary version
from cypress-docker-images.
How so? It would simply cache the latest binary, and if the user is using the latest version, it will use that binary, if they are not, Cypress will download the other version since it's not cached right? If you cache a bunch of versions then you have to worry about the image size being a bit bloated and updating all of the Dockerfiles every time there is a new release. So I was just proposing a quick and easy solution that would benefit some users and not really affect other users because it would continue to function in the same way as it does now. Admittedly my team uses the latest version of Cypress though.
from cypress-docker-images.
@ianwalter as soon as a project falls behind on a Cypress version, the build process would have to go out and download the large binary on every build, in addition to the next version of the binary unnecessarily. Without a project even knowing, their builds would become a lot slower, if not break if they are caching node_modules
and not executing the postInstall
script before cypress run
from cypress-docker-images.
No, I think you're misunderstanding what I'm saying, if users aren't using the latest, they don't have to download 2 binaries as you are suggesting, they would only have to download their version (same way it works now) or 0 binaries if they are using the latest since the feature above should detect its presence. The latest binary would be built into the image so once you pull that image you don't have to download it again (and it's faster since you don't have to unzip, compile, etc). So this shouldn't slow down builds at all or break anything.
from cypress-docker-images.
@ianwalter if users are relying on the docker image to include the binary, they require no caching of the binary at all on their end. Cool.
But if they fall behind the cypress version, their builds are not configured to cache this binary- so this download will happen every time.
from cypress-docker-images.
You know what, it's not important :) Either long term solution, creating an image tag per version or installing the last N versions into the image, works for me. Thanks.
from cypress-docker-images.
Related Issues (20)
- browser-internal docker image not built dual-architecture
- [github actions] unable to solve process (bash) when downloading building cypress/factory HOT 4
- JavaScript heap out of memory
- Images probably missing the 'unzip' command HOT 2
- cypress/browsers:node-18* images can't successfully apt-get update (or install after that) from missing public key E88979FB9B30ACF2 HOT 2
- Critical vulnerability in latest image HOT 1
- firefox in docker Images doen't work in openshift HOT 1
- Font changes since 12.4.0 HOT 1
- Lack of Information in cypress/base Docker Image Documentation
- Locating Specific Docker CypressBrowsers image HOT 1
- Xvbf fails to start with Host RHEL 9.3 + Docker 25.0.3 + Cypress Base Image HOT 2
- cypress/factory for cypress 13.7.1 instructions for running with docker doesnt work
- yarn 1.22.22 fails in cypress/factory HOT 3
- Support for node 20 HOT 3
- Multiple Critical Vulnerabilities Cypress/Included (Recent Tags) HOT 3
- Please upgrade yarn in docker images to 1.22.22 HOT 3
- A tag is needed to set the Node version HOT 1
- Node 20.13.0 gpg: Can't check signature: No public key HOT 3
- Manifest not found for cypress/included:13.9.0 image HOT 4
- chrome - only node 20+ image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-docker-images.