From d55cb73f84b3d0465ca154cd0ab307858eebe8df Mon Sep 17 00:00:00 2001 From: AHdark Date: Thu, 7 Jul 2022 20:41:45 +0800 Subject: [PATCH] Feat: Docker use `GENERATE_SOURCEMAP` in the frontend build section to avoid generating map files. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ed9f101..c657018c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,10 @@ RUN git clone --recurse-submodules https://github.com/cloudreve/Cloudreve.git # build frontend WORKDIR /cloudreve_builder/Cloudreve/assets +ENV GENERATE_SOURCEMAP false + RUN yarn install --network-timeout 1000000 -RUN yarn run build && find . -name "*.map" -type f -delete +RUN yarn run build # build backend WORKDIR /cloudreve_builder/Cloudreve @@ -39,4 +41,4 @@ RUN chmod +x ./cloudreve && mkdir -p /data/aria2 && chmod -R 766 /data/aria2 EXPOSE 5212 VOLUME ["/cloudreve/uploads", "/cloudreve/avatar", "/data"] -ENTRYPOINT ["./cloudreve"] \ No newline at end of file +ENTRYPOINT ["./cloudreve"]