momentum-mod / website

Momentum Mod's main website.
https://momentum-mod.org
MIT License
55 stars 60 forks source link

Backend Docker image should run as non-root user #940

Closed Gocnak closed 2 months ago

Gocnak commented 2 months ago

The backend Docker image we create https://github.com/momentum-mod/website/blob/main/Dockerfile should be run as the backend user created in the image. The node image also has the node user if we wanna just use that as well.

To do so, all we need is to add USER node or USER backend right before the CMD on the last line, like so:

USER backend
CMD [ "node", "main.js" ]