Set permission to write logs and cache on /tmp/npm in case container run as non root

This commit is contained in:
Nico Aymet
2025-06-10 19:11:37 +01:00
parent 289308b01e
commit b7ea97c246
22 changed files with 44 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ CMD [ "npm", "run", "dev" ]
COPY ./TestServer /usr/src/app
# Bundle app source
RUN npm run compile
# Set permission to write logs and cache in case container run as non root
RUN chown -R 1000:1000 "/tmp/npm" && chmod -R 2777 "/tmp/npm"
#Run the app
CMD [ "npm", "start" ]
{{ end }}