pnpm install --frozen-lockfile fails in Docker with ENOENT when pnpm-lock.yaml references patched dependencies (jsdoc@3.6.11.patch) but the patches/ directory is not copied into the container. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
811 B
Docker
36 lines
811 B
Docker
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy workspace files
|
|
COPY pnpm-workspace.yaml .
|
|
COPY pnpm-lock.yaml .
|
|
COPY package.json .
|
|
|
|
# Copy vendor packages (workspace dependencies)
|
|
COPY vendor/discord.js-selfbot-v13 ./vendor/discord.js-selfbot-v13
|
|
|
|
# Copy patches (pnpm patchedDependencies)
|
|
COPY patches ./patches
|
|
|
|
# Copy service
|
|
COPY services/discord-gateway ./services/discord-gateway
|
|
|
|
# Copy Drizzle migrations (relative path used by migrator)
|
|
COPY services/discord-gateway/drizzle ./drizzle
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Build discord gateway
|
|
RUN pnpm --filter './services/discord-gateway' run build
|
|
|
|
# Create recordings directory
|
|
RUN mkdir -p /app/recordings
|
|
|
|
# Start discord gateway
|
|
CMD ["node", "services/discord-gateway/dist/index.js"]
|