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

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

Merged

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Jun 21, 2024

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
Copy link

@MikeMcC399
Copy link
Collaborator Author

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399 MikeMcC399 force-pushed the remove/non-root-alternative branch 3 times, most recently from 0830aeb to 59256c5 Compare June 21, 2024 16:17
@MikeMcC399 MikeMcC399 marked this pull request as ready for review June 21, 2024 16:31
@MikeMcC399
Copy link
Collaborator Author

@jennifer-shehane

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

@jennifer-shehane
Copy link
Member

Sorry, it was failing for a bit

@jennifer-shehane jennifer-shehane merged commit 50ef26a into cypress-io:master Jun 28, 2024
31 checks passed
@MikeMcC399 MikeMcC399 deleted the remove/non-root-alternative branch June 28, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Obsolete examples/included-as-non-root-alternative
3 participants