Skip to content

Commit 8b64acf

Browse files
committed
Clean npm cache after install in same layer so it isn't committed to the image
Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
1 parent eab0b55 commit 8b64acf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

services/tenant-ui/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ WORKDIR /usr/src/app
77
COPY package.json package-lock.json ./
88
COPY frontend/package.json frontend/package-lock.json ./frontend/
99

10-
# install backend libs
11-
RUN npm ci
10+
# install backend libs (clean the npm cache in the same layer so it isn't committed to the image)
11+
RUN npm ci && npm cache clean --force
1212
# install frontend libs
13-
RUN cd frontend && npm ci
13+
RUN cd frontend && npm ci && npm cache clean --force
1414

1515
# Copy in the source - code changes only invalidate layers from here down
1616
COPY . .

0 commit comments

Comments
 (0)