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

Outdated legacy examples/included-as-non-root #1084

Closed
MikeMcC399 opened this issue Jun 3, 2024 · 1 comment · Fixed by #1127
Closed

Outdated legacy examples/included-as-non-root #1084

MikeMcC399 opened this issue Jun 3, 2024 · 1 comment · Fixed by #1127

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Jun 3, 2024

Situation

The README in examples/included-as-non-root states than if cypress/included is run as a non-root user, Cypress will not be able to access the cached Cypress binary.

It suggests as a solution to build a new image based on cypress/included which moves the cached Cypress binary to the non-root user's home directory.

Tests

Legacy Cypress

cypress/included:3.8.0

The example is set up to use cypress/included:3.8.0. With the non-root user node it can be confirmed that Cypress is unable to access the cached Cypress binary.

cd examples/included-as-non-root
docker run -it -v $PWD/src:/test -w /test -u node cypress/included:3.8.0
The cypress npm package is installed, but the Cypress binary is missing.

We expected the binary to be installed here: /home/node/.cache/Cypress/3.8.0/Cypress/Cypress

Current Cypress

After updating the Cypress project in examples/included-as-non-root/src by migrating to Cypress 13.0, the test project runs without needing to build a new image.

docker run -it -v $PWD/src:/test -w /test -u node cypress/included:13.10.0

Conclusion

The issue of access to the cached Cypress binary in cypress/included, which the example explains and provides a resolution for, is no longer an issue using the current cypress/included:13.10.0 image.

Suggestion

Migrate the example examples/included-as-non-root to Cypress 13.x, explaining that this is no longer an issue.

@MikeMcC399 MikeMcC399 self-assigned this Jun 3, 2024
@MikeMcC399 MikeMcC399 changed the title Review: examples/included-as-non-root Outdated legacy examples/included-as-non-root Jun 20, 2024
@MikeMcC399
Copy link
Collaborator Author

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