Cache yarn dependencies (#615)

* Cache yarn dependencies

* changelog
This commit is contained in:
Will Hunt 2023-01-06 17:21:08 +00:00 committed by GitHub
parent 8eab1ff750
commit 707ce0de2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@ RUN apt-get update && apt-get install -y build-essential cmake
WORKDIR /src
COPY package.json yarn.lock ./
RUN yarn config set yarn-offline-mirror /cache/yarn
RUN yarn --ignore-scripts --pure-lockfile --network-timeout 600000
COPY . ./
@ -34,7 +35,8 @@ FROM node:16-slim
WORKDIR /bin/matrix-hookshot
COPY --from=builder /src/yarn.lock /src/package.json ./
COPY --from=builder /cache/yarn /cache/yarn
RUN yarn config set yarn-offline-mirror /cache/yarn
RUN yarn --network-timeout 600000 --production --pure-lockfile && yarn cache clean

1
changelog.d/615.misc Normal file
View File

@ -0,0 +1 @@
Cache yarn dependencies during Docker build.