Skip to content

run install and gulp as node user #1

@uleodolter

Description

@uleodolter

Hi,

running the node process as root user is not perfect, gulp tasks write as root user into mounted volumes.

i would suggest to run everything as node user except the global gulp install:

RUN npm install -g gulp
USER node
WORKDIR /home/node
...

for me that works perfect because my local user ulrich:ulrich has uid=1000, gid=1000 identical to node user inside docker container.

i wonder how this can be made more generic, maybe docker-compose should pass uid,gid from local user into container and then modify node user at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions