From ca5113fd3384c1a56ba734c627cf86cbb571c7d7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 16 Apr 2025 10:40:31 +0800 Subject: [PATCH] chore: update Dockerfile and add .dockerignore - Modified the Dockerfile to change the way application code is added, improving clarity and structure. - Updated the COPY command to reference the correct path for built artifacts. - Added a new .dockerignore file to exclude node_modules from the Docker build context, optimizing the build process. - Removed the unnecessary .Dockerfile.swp file. --- frontend/.Dockerfile.swp | Bin 12288 -> 0 bytes frontend/{crawlab-ui => }/.dockerignore | 0 frontend/Dockerfile | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 frontend/.Dockerfile.swp rename frontend/{crawlab-ui => }/.dockerignore (100%) diff --git a/frontend/.Dockerfile.swp b/frontend/.Dockerfile.swp deleted file mode 100644 index 7dc4d5c48d8c3ac96a3f5a785cfc88d6d3fdd320..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2O=}ZD7{{lA7sVG8MDX%x#e=Zfz6o0BA#GX>nl_}iQZHq)J4wfEX4c83C5n2| zub|&UQ1By&NA&~fHxN8|sQ=l#P(mwSm1p43?#wgu%*^j0hb8~|)MmLtw+d4N?W_>3 z3;WHt*M1&<{6UDebh}S>q-pxtA6fI5$I-(;N~eYJ2RdC z)F-c8rt{}Ej+)KmOn?b60Vco%m;e)C0!)Aj{D%axbV9tqy^am;c4_dO7<&%7{9po1 zfC(@GCcp%k025#WOn?b60Vco%{y_pV7UIq+AwEI=|Nr6l|Bo|5e1SegZ=fEu0xd%q zp_9-F=+|i>zC+)jkI;MQ9rPM{1-*pY&_ieoT7hmrbI|@^->-geZcKm)FaajO1egF5 zU;<2l2`~XB@Ye*E)~Z_+1aL~X7wTP|#1zUj^&0uC!&rB+{;+=&leA>h9$Az0DBDrw zmt`bfrW+FWZ1TBAftWg(Y{GWEQd_H#Oj2#s{A^)*4r$=|j=NE&trQJXovUEtP9I9R$}^mfw8Ox|TLginW7d-MStU z<$(x>bO{6wU&X7Nv{}Btyj`qTq4M@(aeaAvqjrz3K0S2&nJCt7AHHM(1=HBS=$hTO zGAM#HF)6dF;ehu8v@4yK^+cgO*7ec)1Ez4yqdcIK*T>-U^D|RHzfM$KA1gw?mcIc# C+y%e@ diff --git a/frontend/crawlab-ui/.dockerignore b/frontend/.dockerignore similarity index 100% rename from frontend/crawlab-ui/.dockerignore rename to frontend/.dockerignore diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 69c50de0..c799f06c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -12,7 +12,7 @@ WORKDIR /app RUN npm install -g pnpm # Copy application code -ADD crawlab-ui/* . +ADD ./crawlab-ui /app # Install project dependencies RUN pnpm install @@ -24,4 +24,4 @@ RUN pnpm run build FROM alpine:3.14 # Copy only the built artifacts from the build stage -COPY --from=build /app/apps/crawlab/dist /app/dist +COPY --from=build /app/dist /app/dist