TruBudget
TruBudget copied to clipboard
Wrong user in Docker file of the API
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