Skip to content

Commit

Permalink
Change docker to not install dev dependency (#2069)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ScottDormand96 authored Nov 7, 2024
1 parent b0b32ea commit be53a67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/gafl-webapp-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/recurring-payments-job/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sales-api-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be53a67

Please sign in to comment.