fix(docker): skip husky prepare script in production install

Remove the prepare script before pnpm install --prod since husky
is a devDependency and not available in production builds.
This commit is contained in:
Siddharth Kumar Sah
2026-03-26 01:10:51 +08:00
parent 4b2621d9f2
commit 200e7d10c1
+3 -1
View File
@@ -93,7 +93,9 @@ COPY packages/image-engine/package.json packages/image-engine/tsconfig.json ./pa
COPY packages/ai/package.json packages/ai/tsconfig.json ./packages/ai/
# Install production dependencies (tsx is now in prod deps)
RUN pnpm install --frozen-lockfile --prod
# Skip the root prepare script (husky is a devDep, not available in prod)
RUN npm pkg delete scripts.prepare && \
pnpm install --frozen-lockfile --prod
# Remove build tools no longer needed in production
RUN apt-get purge -y --auto-remove build-essential python3-dev && \