Jelajahi Sumber

docker: drop privileges to improve security

Bernadette Elena Hammerle 3 tahun lalu
induk
melakukan
1d8990bcff
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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"]