diff options
author | Vijay A <avijayr@protonmail.com> | 2021-09-25 12:31:49 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-09-25 12:31:49 +0530 |
commit | 3bddc1ee17ef8c3e6e803b5d143f6d161ae4daa2 (patch) | |
tree | e90589fd220307db86850de70c9aade7dbdaca01 | |
parent | chore: remove node cache cleanup (try to speed up build) (diff) | |
download | ferdium-app-3bddc1ee17ef8c3e6e803b5d143f6d161ae4daa2.tar.gz ferdium-app-3bddc1ee17ef8c3e6e803b5d143f6d161ae4daa2.tar.zst ferdium-app-3bddc1ee17ef8c3e6e803b5d143f6d161ae4daa2.zip |
chore: refactor Dockerfile to make use of layer cache when installing npm modules. [skip ci]
-rw-r--r-- | Dockerfile | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile index d3589005b..821b7a808 100644 --- a/Dockerfile +++ b/Dockerfile | |||
@@ -17,13 +17,16 @@ RUN apt-get update -y \ | |||
17 | WORKDIR /usr/src/ferdi | 17 | WORKDIR /usr/src/ferdi |
18 | 18 | ||
19 | RUN npm i -g pnpm@6.14.7 \ | 19 | RUN npm i -g pnpm@6.14.7 \ |
20 | && npm i -g node-gyp@8.1.0 \ | 20 | && npm ls -g node-gyp@8.1.0 || npm i -g node-gyp@8.1.0 \ |
21 | && npm i -g lerna@4.0.0 | 21 | && npm ls -g lerna@4.0.0 || npm i -g lerna@4.0.0 |
22 | 22 | ||
23 | COPY . . | 23 | COPY package*.json . |
24 | COPY lerna.json . | ||
25 | |||
26 | RUN npm i \ | ||
27 | && npx lerna bootstrap | ||
24 | 28 | ||
25 | # Note: Ideally this needs to be done before the COPY step - BUT moving this here resolves the issue with `preval-build-info-cli` not being found | 29 | COPY . . |
26 | RUN npx lerna bootstrap | ||
27 | 30 | ||
28 | WORKDIR /usr/src/ferdi/recipes | 31 | WORKDIR /usr/src/ferdi/recipes |
29 | 32 | ||