cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1k stars 376 forks source link

Remove examples/included-as-non-root-alternative #1128

Closed MikeMcC399 closed 1 week ago

MikeMcC399 commented 2 weeks ago

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 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:

$ docker run -it --rm --entrypoint bash cypress/included:13.11.0
root@4f06bf685137:/# ls -ld /root
drwxrwxrwx 1 root root 4096 Jun 10 11:41 /root
root@4f06bf685137:/# echo $CYPRESS_CACHE_FOLDER
/root/.cache/Cypress
root@4f06bf685137:/# cypress cache path
/root/.cache/Cypress
root@4f06bf685137:/# cypress verify

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]

Change

Remove the obsolete examples/included-as-non-root-alternative example.

Note:

cypress-app-bot commented 2 weeks ago
MikeMcC399 commented 2 weeks ago

Preview

https://github.com/MikeMcC399/cypress-docker-images/tree/remove/non-root-alternative/included#alternate-users

MikeMcC399 commented 2 weeks ago
MikeMcC399 commented 1 week ago

@jennifer-shehane

You approved this PR a couple of days ago. Would you like to merge it now?

jennifer-shehane commented 1 week ago

Sorry, it was failing for a bit