2018-05-29 19:01:36 +03:00
|
|
|
FROM node:8.11.2-alpine
|
|
|
|
|
|
|
|
RUN addgroup -g 10001 app && \
|
|
|
|
adduser -D -G app -h /app -u 10001 app
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
USER app
|
|
|
|
|
|
|
|
COPY package.json package.json
|
|
|
|
COPY package-lock.json package-lock.json
|
|
|
|
|
|
|
|
RUN npm install && rm -rf ~app/.npm /tmp/*
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
USER root
|
2018-09-21 17:54:27 +03:00
|
|
|
|
|
|
|
RUN npm run build:all
|
|
|
|
|
2018-05-29 19:01:36 +03:00
|
|
|
RUN chown app:app /app
|
|
|
|
|
|
|
|
USER app
|
|
|
|
CMD node server.js
|