use a non-root user for npm install in docker

This commit is contained in:
Danny Coates 2017-06-22 17:20:41 -07:00
parent 9d1e207c2f
commit 2691dfcf2f
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
FROM node:8.1-alpine
FROM node:8-alpine
RUN adduser -S app
COPY . /app
RUN chown -R app /app
USER app
WORKDIR /app
RUN mkdir static
RUN npm install