Skip to content

Add a default node user to all image #253

Closed

Description

@LaurentGoderre

Hey guys,

Sorry for dropping off the map, I had a new baby and was off work for a while. I was wondering if you guys would consider adding a default user for images:

RUN groupadd -r node && useradd -r -g node node

This would bring this in line with other images like postgress https://github.com/docker-library/postgres/blob/b2317dd369030a5f3f030b1daa1fc80da3cab9e0/9.6/Dockerfile#L5

Is there any reason why we want to stay as root?

Activity

  1. pesho commented on Oct 19, 2016

    @pesho
    Contributor

    Adding an user is a very frequent operation when deploying in production, so having this makes sense. Switching to that user by default not so much, it's likely to break some existing usages.

    Perhaps user or app would be better as usernames?

  2. Starefossen commented on Oct 19, 2016

    @Starefossen
    Member

    +1 for app

  3. LaurentGoderre commented on Oct 20, 2016

    @LaurentGoderre
    MemberAuthor

    Node is not used only for apps though, for example, it would be a bit awkward to do docker run -u app node grunt.

  4. davidbarton commented on Oct 20, 2016

    @davidbarton

    +1 for adding one of node, app, node_user

  5. LaurentGoderre commented on Oct 20, 2016

    @LaurentGoderre
    MemberAuthor

    I kind of like node_user as well

  6. added a commit that references this issue on Oct 25, 2016
    9234116
  7. davidbarton commented on Nov 4, 2016

    @davidbarton

    Don't forget to document this feature in README please :)

  8. chorrell commented on Nov 4, 2016

    @chorrell
    Contributor

    @davidbarton Good point! If you submit a PR I'd be happy to review it ;)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions