Skip to content

Conversation

rugk
Copy link

@rugk rugk commented Oct 6, 2025

Description

This IMHO highlights a critical part.

Motivation and Context

Fixes #2287 (see there for more reasoning)

IMHO, you may also link the best practices on https://hub.docker.com/_/node/#how-to-use-this-image directly, to save some more clicks and hopefully make more people find the information about non-root users.

I personally have not found that information as I searched for best on docker-hub and for root there and this Readme. (I missed searching for best again so maybe this helps.)

Testing Details

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.

Fixes nodejs#2287

IMHO, you may also link the best practices on https://hub.docker.com/_/node/#how-to-use-this-image directly, to save some more clicks and hopefully make more people find the information about non-root users.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the README to better highlight security best practices, specifically drawing attention to the non-root user guidance in the Best Practices documentation.

  • Adds a security-focused note to make non-root user information more discoverable
  • Links directly to the specific section about non-root users in the best practices guide

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

### Best Practices

We have assembled a [Best Practices Guide](./docs/BestPractices.md) for those using these images on a daily basis.
This includes **security relevant** information e.g. on [how to run use a non-root user](./docs/BestPractices.md#non-root-user).
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected the phrase 'how to run use a non-root user' to 'how to use a non-root user' by removing the redundant 'run' word.

Suggested change
This includes **security relevant** information e.g. on [how to run use a non-root user](./docs/BestPractices.md#non-root-user).
This includes **security relevant** information e.g. on [how to use a non-root user](./docs/BestPractices.md#non-root-user).

Copilot uses AI. Check for mistakes.

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.

Explain how to use/build rootless aka using the node user instead of the default root user

1 participant