examples/included-as-non-root-alternative demonstrates how to build a new Docker image on top of cypress/included, giving all users read access to the /root directory and setting CYPRESS_CACHE_FOLDER=/root/.cache/Cypress.
This solution is redundant since the release of cypress/included:3.8.1 in 2019. This can be demonstrated on the cypress/included:latest image which shows:
Compare to the legacy cypress/included:3.8.0 image, which allows only the root user to access the /root directory and does not set the environment variable CYPRESS_CACHE_FOLDER:
$ docker run -it --rm --entrypoint bash cypress/included:3.8.0
root@955380fdb987:/# ls -ld /root
drwx------ 1 root root 4096 Dec 13 2019 /root
root@955380fdb987:/# echo $CYPRESS_CACHE_FOLDER
root@955380fdb987:/# cypress cache path
root@955380fdb987:/# cypress verify
[08:32:00] Verifying Cypress can run /root/.cache/Cypress/3.8.0/Cypress [started]
[08:32:01] Verifying Cypress can run /root/.cache/Cypress/3.8.0/Cypress [completed]
Issue
examples/included-as-non-root-alternative demonstrates how to build a new Docker image on top of
cypress/included
, giving all users read access to the/root
directory and settingCYPRESS_CACHE_FOLDER=/root/.cache/Cypress
.This solution is redundant since the release of
cypress/included:3.8.1
in 2019. This can be demonstrated on thecypress/included:latest
image which shows:Compare to the legacy
cypress/included:3.8.0
image, which allows only theroot
user to access the/root
directory and does not set the environment variableCYPRESS_CACHE_FOLDER
:Change
Remove the obsolete examples/included-as-non-root-alternative example.
Note:
cypress/included
with a non-root user.