Skip to content

Commit 62f6b87

Browse files
committed
fix(docker): remove invalid copy operations for non-existent build artifacts
- Remove COPY commands for /app/lib and /app/build that don't exist in dependencies stage - Update validation to reflect native modules are built separately in CI - Fix Docker build failure caused by missing directories in container build
1 parent 1de5e21 commit 62f6b87

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ FROM base AS runtime
4949
COPY --from=dependencies --chown=node:node /app/node_modules ./node_modules
5050
COPY --from=dependencies --chown=node:node /app/.npm ./.npm
5151

52-
# Copy built native module if it exists
53-
COPY --from=dependencies --chown=node:node /app/lib ./lib || true
54-
COPY --from=dependencies --chown=node:node /app/build ./build || true
52+
# Note: Native modules are built separately in CI and not included in container
5553

5654
# Copy application code
5755
COPY --chown=node:node package.json pnpm-lock.yaml ./
@@ -61,15 +59,8 @@ COPY --chown=node:node test/ ./test/
6159
COPY --chown=node:node tsconfig.json vitest.config.ts ./
6260
COPY --chown=node:node binding.gyp ./
6361

64-
# Validate native module installation
65-
RUN echo "🔍 Validating native module installation..." \
66-
&& if [ -d "lib/binding" ]; then \
67-
echo "✅ Native module directory found"; \
68-
find lib/binding -name "*.node" -exec echo "Found: {}" \; \
69-
|| echo "⚠️ No .node files found in lib/binding"; \
70-
else \
71-
echo "⚠️ Native module directory not found, will build on demand"; \
72-
fi
62+
# Note: Native modules will be built on-demand or mounted from CI artifacts
63+
RUN echo "📝 Container ready for native module compilation"
7364

7465
# Switch to non-root user
7566
USER node

0 commit comments

Comments
 (0)