chore: Refactor Dockerfile to improve cleanup process by replacing multiple find commands with targeted rm commands for better efficiency and clarity in the build output.
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m22s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Failing after 1m51s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 6s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped

This commit is contained in:
Denozordec
2026-06-22 16:04:14 +07:00
parent 1be714b8d2
commit e6b1f81246
+4 -2
View File
@@ -27,8 +27,10 @@ COPY packages/db packages/db
RUN pnpm turbo build --filter=web --filter=@cfdm/api \
&& pnpm --filter @cfdm/api deploy --prod /out \
&& cp -r apps/web/dist /out/static \
&& find /out -type d \( -name src -o -name test -o -name .turbo -o -name scripts \) -exec rm -rf {} + \
&& find /out -type f \( -name '*.d.ts' -o -name '*.map' -o -name 'tsconfig*.json' -o -name 'vitest.config.ts' -o -name 'drizzle.config.ts' -o -name 'README*' -o -name 'LICENSE*' -o -name 'CHANGELOG*' \) -delete
&& rm -rf /out/src /out/test /out/.turbo \
&& rm -rf /out/node_modules/@cfdm/db/src /out/node_modules/@cfdm/db/scripts /out/node_modules/@cfdm/db/.turbo \
&& rm -rf /out/node_modules/@cfdm/shared/src /out/node_modules/@cfdm/shared/.turbo \
&& find /out -path '*/node_modules/*' -prune -o -type f \( -name '*.d.ts' -o -name '*.map' -o -name 'tsconfig*.json' -o -name 'vitest.config.ts' -o -name 'drizzle.config.ts' \) -print -delete
FROM node:${NODE_VERSION}
RUN apt-get update \