Skip to content

chore: exclude .pnpm-store from Docker build context - #3313

Merged
M0NsTeRRR merged 1 commit into
seerr-team:developfrom
samtheruby:patch-2
Jul 30, 2026
Merged

chore: exclude .pnpm-store from Docker build context#3313
M0NsTeRRR merged 1 commit into
seerr-team:developfrom
samtheruby:patch-2

Conversation

@samtheruby

@samtheruby samtheruby commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

On local builds the .pnpm-store directory is not excluded from the build context. Since it's never referenced by the Dockerfile RUN --mount=type=cache uses its own in-container store path, and it gets shipped to the daemon on every build for no benefit. Adding .pnpm-store to .dockerignore cuts build context size by over 1gb with no change to build output.

  • Fixes N/A

How Has This Been Tested?

Local Docker build was run successfully with image output size reduced by 1.2gb

Screenshots / Logs (if applicable)

N/A

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

On local builds the .pnpm-store directory is not excluded from the build context. Since it's never referenced by the Dockerfile RUN --mount=type=cache uses its own in-container store path, and it gets shipped to the daemon on every build for no benefit. Adding .pnpm-store to .dockerignore cuts build context size by over 1gb with no change to build output.
@samtheruby
samtheruby requested a review from a team as a code owner July 30, 2026 03:57
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Docker ignore configuration now excludes .pnpm-store from Docker build context uploads.

Changes

Docker context configuration

Layer / File(s) Summary
Exclude pnpm store from Docker context
.dockerignore
Adds .pnpm-store to the ignored paths for Docker build contexts.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: 0xsysr3ll, danshilm

Poem

A bunny tucked the store away,
Safe from Docker’s busy day.
No pnpm fluff shall cross the gate,
Builds stay tidy, small, and great!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: excluding .pnpm-store from the Docker build context.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@samtheruby samtheruby changed the title Add .pnpm-store to .dockerignore build: exclude .pnpm-store from Docker build context Jul 30, 2026
@M0NsTeRRR

Copy link
Copy Markdown
Member

Hello,

What does the pnpm store path command return? By default from what I read, it should not be in the seerr folder unless you explicitly configured it to be there.

https://github.com/pnpm/pnpm/blob/main/pnpm/crates/config/src/defaults.rs#L77

@samtheruby

Copy link
Copy Markdown
Contributor Author

Generally, you are right and on any CI build or even a lot of local builds .pnpm-store should not be carried over, however since my home folder and project folder live on different disks/volumes, pnpm can't hardlink the files properly, so it falls back to putting the store inside the project folder instead. Whether it's worth fixing a niche case is a different matter, but either way I don't think there is any downside to explicitly excluding .pnpm-store so it's never copied over.

pnpm store path returns /mnt/user/<share name>/docker-build/seerr/.pnpm-store/v11

@seerr-automation-bot seerr-automation-bot added this to the v3.5.0 milestone Jul 30, 2026
@M0NsTeRRR M0NsTeRRR changed the title build: exclude .pnpm-store from Docker build context chore: exclude .pnpm-store from Docker build context Jul 30, 2026
@M0NsTeRRR
M0NsTeRRR enabled auto-merge (squash) July 30, 2026 13:29
@M0NsTeRRR
M0NsTeRRR merged commit bd491c7 into seerr-team:develop Jul 30, 2026
20 of 25 checks passed
@samtheruby
samtheruby deleted the patch-2 branch July 30, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants