Skip to content

Latest commit

 

History

History
 
 

included-as-non-root-alternative

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Running cypress/included image as non-root (alternative)

In this example, we build a new Docker image on top of cypress/included image, but we give all users read access to the folder /root where Cypress NPM package and Cypress binary are installed, see Dockerfile

As a second step, we set the environment variable CYPRESS_CACHE_FOLDER=/root/.cache/Cypress to ensure that every user can find the cached binary and use it to run tests.

You can build the cypress/example image and run current tests as built-in second user node (comes from Node base image) with:

$ ./build.sh
$ ./test.sh