Skip to content

Update Best Practices to include note about chown on COPY #2271

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mrjones-plip
Copy link

Description

When implementing the advice on the best practice page, I was struggling to get my code to execute. After some debugging I realized that the node user did not have enough permissions to access my files.

Motivation and Context

We should include explicit advice to easily give node user access to the files which most users will do via a COPY command in their Dockerfile. If they're doing it via a bind mount, the same advice will get them thinking about file permissions.

Testing Details

As this is a docs change, no code tests are done, but I did confirm that the advice I'm adding does indeed work.

Note - I didn't run any of the tests (All new and existing tests passed) as I'm just making an edit to an .md file.

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant