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
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.
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 usernode
it can be confirmed that Cypress is unable to access the cached Cypress binary.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.
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 currentcypress/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.