Problem
Running docker compose build from a fresh clone fails before containers can start.
I can reproduce two blockers in sequence:
.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
- 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
- Clone repo
- 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.
Problem
Running
docker compose buildfrom a fresh clone fails before containers can start.I can reproduce two blockers in sequence:
.dockerignoreexcludespnpm-lock.yaml, butDockerfilecopies it (COPY package.json pnpm-lock.yaml ...). Build fails with:failed to calculate checksum ... "/pnpm-lock.yaml": not foundcorepack 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.7Steps to reproduce
docker compose buildExpected
Docker images build successfully from a clean clone.
Suggested fix
pnpm-lock.yamlin.dockerignorelatestI prepared a PR with this fix.