TruBudget icon indicating copy to clipboard operation
TruBudget copied to clipboard

Wrong user in Docker file of the API

Open mayrmartin opened this issue 2 years ago • 0 comments

Description 😯

From 2.1 on the wrong user is used in the API Docker container. There is no need to create a new user, simply use the node user.

Replace:

# Create user
RUN useradd -ms /bin/bash newuser
# Give users permission to read and execute files
# Only root is the owner and has write permissions
RUN chmod -R u+rx /home/node
# Switch from root to normal user (this is a security best practice)
USER newuser

Witch

# Switch from root to Node user (this is a security best practice)
USER node

mayrmartin avatar Aug 23 '22 11:08 mayrmartin