use a non-root user for npm install in docker
This commit is contained in:
parent
9d1e207c2f
commit
2691dfcf2f
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
||||||
FROM node:8.1-alpine
|
FROM node:8-alpine
|
||||||
|
|
||||||
|
RUN adduser -S app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
RUN chown -R app /app
|
||||||
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN mkdir static
|
RUN mkdir static
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
Loading…
Reference in a new issue