Parcourir la source

docker: drop privileges to improve security

Bernadette Elena Hammerle il y a 3 ans
Parent
commit
1d8990bcff
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      Dockerfile

+ 2 - 0
Dockerfile

@@ -8,4 +8,6 @@ RUN npm install
 
 COPY . /app
 
+RUN mkdir /app/node_modules/.cache && chown nobody /app/node_modules/.cache
+USER nobody
 CMD ["npm", "start"]