GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Explain how to use/build rootless aka using the node user instead of the default root user · Issue #2287 · nodejs/docker-node

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

New issue
Copy link
New issue
Copy link
Open
Open
Explain how to use/build rootless aka using the node user instead of the default root user#2287
Copy link
Labels
docs

Description

@rugk
rugk
opened on Oct 6, 2025
Issue body actions

Problem

Many people likely follow your simple guide here.

It is, however, a security best practice to make your service run as non-root inside the container: https://docs.docker.com/build/building/best-practices/#user

Especially when it is executed in a rootful way this increases the security.

Solution

There is no documentation in the README to run it like this, but the usual steps for building an app likely will be similar?

Alternatives to Consider

N/A

Came here from orangecoding/fredy#207 BTW

Activity

  1. rugk commented on Oct 6, 2025

    @rugk
    rugk
    on Oct 6, 2025
    Author
    More actions

    Ah found it! https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#non-root-user

    IMHO that's quite hidden though for a a best practices document…

  2. rugk
    added a commit that references this issue on Oct 6, 2025

    Make it more obvious how to run a node image as non-root

    5047640
  3. rugk commented on Oct 6, 2025

    @rugk
    rugk
    on Oct 6, 2025
    Author
    More actions

    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. So if you adjust the docs there for #2286 you may likewise add a link to the best practices here.

  4. MikeMcC399
    added
    docs
    on May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.