Skip to content

Commit 4e4d25e

Browse files
authored
Updated Containerfile to solve NPM caching problems (#394)
1 parent d1dc542 commit 4e4d25e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/deploy-console/todo-list/Containerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
FROM registry.access.redhat.com/ubi8/nodejs-16-minimal:1-65
22

3+
ENV NPM_CACHE=/tmp/.npm
4+
5+
RUN npm config set cache "$NPM_CACHE" --location=global
6+
37
COPY package.json package-lock.json ./
48

59
RUN npm ci
610

11+
RUN chown -R 1001:0 "$NPM_CACHE" && chmod -R ugo+rwx "$NPM_CACHE"
12+
713
COPY . .
814

915
EXPOSE 3000

0 commit comments

Comments
 (0)