Skip to content

Keep Docker dependency cache between jobs - #1508

Merged
skyfallwastaken merged 4 commits into
mainfrom
fix-docker-publish-cache
Aug 4, 2026
Merged

Keep Docker dependency cache between jobs#1508
skyfallwastaken merged 4 commits into
mainfrom
fix-docker-publish-cache

Conversation

@skyfallwastaken

@skyfallwastaken skyfallwastaken commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Store installed JavaScript packages in an immutable Docker layer.
  • Keep Bun’s isolated linker.
  • Remove the cache mount that Blacksmith did not restore.

The failed main build spent 46.4s reinstalling packages. The next Blacksmith PR build reused the dependency layer and finished its Docker build in 4.7s.

Copilot AI review requested due to automatic review settings August 3, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the production Docker build to make JavaScript dependencies portable across CI jobs by baking node_modules into the javascript-dependencies stage layer and consuming it via BuildKit bind mounts, instead of relying on a cache mount that Blacksmith wasn’t restoring.

Changes:

  • Install JS dependencies directly into an immutable image layer in javascript-dependencies (removing the /rails/.deps cache-mount approach).
  • Keep Bun’s isolated linker and continue using Bun’s download cache mount.
  • Switch docs and Vite asset stages to bind-mount node_modules from the dependencies stage; add dedicated cache mounts for Vite cache directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Dockerfile Outdated
@skyfallwastaken
skyfallwastaken merged commit 0186bb0 into main Aug 4, 2026
19 checks passed
@skyfallwastaken
skyfallwastaken deleted the fix-docker-publish-cache branch August 4, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants