diff --git a/.dockerignore b/.dockerignore index 144e527cd9..3c3629e647 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1 @@ node_modules -usage-data-config.json diff --git a/Dockerfile b/Dockerfile index fff3a796cd..78337f9ae5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,9 @@ FROM node:8.12-alpine ADD . /app WORKDIR /app -ARG COLLECT_USAGE_DATA=true +RUN npm install --production -RUN npm install -RUN echo "{\"collectUsageData\": $COLLECT_USAGE_DATA}" > usage-data-config.json +RUN adduser -D -g nodejs -u 1002 nodejs && chown -R nodejs:nodejs . EXPOSE 3000 CMD ["npm", "start"]