Explorar el Código

docker: drop privileges to improve security

Bernadette Elena Hammerle hace 3 años
padre
commit
1d8990bcff
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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"]