From e5070f5972b3416f419d0074014aaabe45e9bddc Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 19 Apr 2024 18:29:27 +0200 Subject: [PATCH] switch to clean-modules Signed-off-by: Zoey --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c1f3bc7c..bc4e23a46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,9 @@ ARG NODE_ENV=production \ WORKDIR /build/frontend RUN apk upgrade --no-cache -a && \ apk add --no-cache ca-certificates nodejs yarn git python3 build-base && \ + yarn global add clean-modules && \ yarn --no-lockfile install && \ + clean-modules --yes && \ yarn --no-lockfile build && \ yarn cache clean --all COPY darkmode.css /build/frontend/dist/css/darkmode.css @@ -23,13 +25,13 @@ ARG NODE_ENV=production \ WORKDIR /build/backend RUN apk upgrade --no-cache -a && \ apk add --no-cache ca-certificates nodejs-current yarn && \ - wget -q https://gobinaries.com/tj/node-prune -O - | sh && \ + yarn global add clean-modules && \ if [ "$TARGETARCH" = "amd64" ]; then \ npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile; \ elif [ "$TARGETARCH" = "arm64" ]; then \ npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile; \ fi && \ - node-prune && \ + clean-modules --yes && \ yarn cache clean --all