From 4463e1c112a2f671aace078a511fccb08f2a2623 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 25 Apr 2022 16:11:25 +0100 Subject: [PATCH] Clean cache, and don't generate a lockfile (#319) * Clean cache, and don't generate a lockfile * changelog --- Dockerfile | 4 ++-- changelog.d/319.misc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/319.misc diff --git a/Dockerfile b/Dockerfile index 82aa7615..9ec7b7b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" # Workaround: Need to install esbuild manually https://github.com/evanw/esbuild/issues/462#issuecomment-771328459 RUN yarn --ignore-scripts RUN node node_modules/esbuild/install.js -RUN yarn build +RUN yarn build --pure-lockfile # Stage 1: The actual container FROM node:16 @@ -23,7 +23,7 @@ COPY --from=builder /src/public/ /bin/matrix-hookshot/public/ COPY --from=builder /src/package.json /bin/matrix-hookshot/ COPY --from=builder /src/yarn.lock /bin/matrix-hookshot/ WORKDIR /bin/matrix-hookshot -RUN yarn --production +RUN yarn --production --pure-lockfile && yarn cache clean VOLUME /data EXPOSE 9993 diff --git a/changelog.d/319.misc b/changelog.d/319.misc new file mode 100644 index 00000000..b319177a --- /dev/null +++ b/changelog.d/319.misc @@ -0,0 +1 @@ +Reduce Docker image size. \ No newline at end of file