From 10ffb413539f4290182507caa65bb557fd52e3ba Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Tue, 2 Mar 2021 14:19:24 +0000 Subject: [PATCH] Update Dockerfile --- shields/Dockerfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/shields/Dockerfile b/shields/Dockerfile index 58a4558..16476b5 100644 --- a/shields/Dockerfile +++ b/shields/Dockerfile @@ -3,15 +3,10 @@ FROM node:12-alpine RUN mkdir -p /usr/src/app/private WORKDIR /usr/src/app -COPY package.json package-lock.json /usr/src/app/ -# Without the badge-maker package.json and CLI script in place, `npm ci` will fail. -COPY badge-maker /usr/src/app/badge-maker/ - -# We need dev deps to build the front end. We don't need Cypress, though. -RUN NODE_ENV=development CYPRESS_INSTALL_BINARY=0 npm ci - COPY . /usr/src/app -RUN npm run build && \ +# We need dev deps to build the front end. We don't need Cypress, though. +RUN NODE_ENV=development CYPRESS_INSTALL_BINARY=0 npm ci && \ + npm run build && \ npm prune --production && \ npm cache clean --force