Skip to content

Docker compose build fails: lockfile excluded and pnpm latest breaks install #59

Description

@sosoihd

Problem

Running docker compose build from a fresh clone fails before containers can start.

I can reproduce two blockers in sequence:

  1. .dockerignore excludes pnpm-lock.yaml, but Dockerfile copies it (COPY package.json pnpm-lock.yaml ...). Build fails with:
    • failed to calculate checksum ... "/pnpm-lock.yaml": not found
  2. After allowing the lockfile into context, build still fails because Dockerfile uses corepack prepare pnpm@latest --activate, which currently resolves to pnpm v11. With v11, install errors out with:
    • [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: esbuild@0.27.7

Steps to reproduce

  1. Clone repo
  2. Run docker compose build

Expected

Docker images build successfully from a clean clone.

Suggested fix

  • Do not ignore pnpm-lock.yaml in .dockerignore
  • Pin pnpm in Dockerfile to a known working major/minor (e.g. v10), instead of latest

I prepared a PR with this fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions