Skip to content

chore(docker): improve Docker build caching#1094

Draft
msukkari wants to merge 3 commits intomainfrom
cursor/docker-build-performance-5532
Draft

chore(docker): improve Docker build caching#1094
msukkari wants to merge 3 commits intomainfrom
cursor/docker-build-performance-5532

Conversation

@msukkari
Copy link
Copy Markdown
Contributor

@msukkari msukkari commented Apr 3, 2026

Summary

  • enable Dockerfile frontend 1.7 to support BuildKit cache mounts
  • add persistent BuildKit cache mounts for Go module/build caches in Zoekt build steps
  • add persistent BuildKit cache mounts for Yarn cache during workspace installs in Docker build stages
  • use sharing=locked on shared Yarn cache mounts to avoid concurrent write races in parallel build stages
  • enable GitHub Actions cache import/export in pr-gate docker builds so PR checks benefit from the same layer cache mechanism as release builds
  • add an [Unreleased] CHANGELOG.md entry for this PR

Validation

  • cold build benchmark before/after and image size comparison captured in:
  • container smoke test performed against optimized image with a valid config file:
    • container starts, migrations apply, backend/web/zoekt/redis all report running
    • curl -sSL -o /tmp/sourcebot-app-body.txt -w '%{http_code}' http://localhost:3900/~ => 200

Results

  • baseline cold build: 259.552s
  • optimized cold build: 231.894s (about 10.7% faster)
  • optimized warm build: 1.196s (full cache hit)
  • baseline image size: 1890947560 bytes
  • optimized image size: 1890947576 bytes (delta +16 bytes, effectively unchanged)

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 11dd0d49-7633-4b02-b932-3da49de7e11d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/docker-build-performance-5532

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 and usage tips.

cursoragent and others added 2 commits April 3, 2026 20:47
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
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