From be53a67ee11be2624c4f76aecbd7a9a7fd218040 Mon Sep 17 00:00:00 2001 From: Scott Dormand <61588381+ScottDormand96@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:27:33 +0000 Subject: [PATCH] Change docker to not install dev dependency (#2069) * Change docker to not install dev dependency https://eaflood.atlassian.net/browse/IWTF-4280 Change dockerfile to run npm ci instead of npm i so dev dependency not included in docker container * change npm install too npm ci * chnage too install production which has same impact as ci --- packages/gafl-webapp-service/Dockerfile | 2 +- packages/recurring-payments-job/Dockerfile | 2 +- packages/sales-api-service/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/gafl-webapp-service/Dockerfile b/packages/gafl-webapp-service/Dockerfile index c85bfa5b81..1d8143f124 100644 --- a/packages/gafl-webapp-service/Dockerfile +++ b/packages/gafl-webapp-service/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app COPY packages/gafl-webapp-service/package*.json /app/ COPY packages/gafl-webapp-service/assets /app/assets COPY packages/gafl-webapp-service/build /app/build -RUN npm install \ +RUN npm install --production \ && npm run prepare \ && npm prune --production \ && npm cache clean --force > /dev/null 2>&1 diff --git a/packages/recurring-payments-job/Dockerfile b/packages/recurring-payments-job/Dockerfile index 1343d85743..82e32ea0eb 100644 --- a/packages/recurring-payments-job/Dockerfile +++ b/packages/recurring-payments-job/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app # Install app dependencies COPY packages/recurring-payments-job/package*.json /app/ -RUN npm install && npm cache clean --force > /dev/null 2>&1 +RUN npm install --production && npm cache clean --force > /dev/null 2>&1 # Bundle app source COPY packages/recurring-payments-job/ /app diff --git a/packages/sales-api-service/Dockerfile b/packages/sales-api-service/Dockerfile index 08062c1c4b..bcba21b0dc 100644 --- a/packages/sales-api-service/Dockerfile +++ b/packages/sales-api-service/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app # Install app dependencies COPY packages/sales-api-service/package*.json /app/ -RUN npm install && npm cache clean --force > /dev/null 2>&1 +RUN npm install --production && npm cache clean --force > /dev/null 2>&1 # Bundle app source COPY packages/sales-api-service/ /app