Skip to content

chore: Add --no-cache to docker build scripts#1073

Merged
yamadashy merged 1 commit intomainfrom
chore/docker-build-no-cache
Jan 4, 2026
Merged

chore: Add --no-cache to docker build scripts#1073
yamadashy merged 1 commit intomainfrom
chore/docker-build-no-cache

Conversation

@yamadashy
Copy link
Owner

Summary

Ensure clean builds when running website and website-bundle scripts by adding --no-cache flag to docker compose build commands.

Changes

  • npm run website: now runs docker compose build --no-cache before up
  • npm run website-bundle: now runs docker compose build --no-cache before up

Checklist

  • Run npm run test
  • Run npm run lint

Ensure clean builds when running website and website-bundle scripts
by adding --no-cache flag to docker compose build commands.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

Two npm scripts in package.json are modified to separate the Docker build and container startup operations. The website and website-bundle scripts now execute a build step with --no-cache before running the services, rather than combining both operations with the --build flag.

Changes

Cohort / File(s) Summary
npm scripts
package.json
Updated website and website-bundle scripts to split docker compose up --build into separate build --no-cache and up commands.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding the --no-cache flag to docker build scripts in npm scripts.
Description check ✅ Passed The pull request description includes a summary, detailed changes section, and completed checklist matching the repository template requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/docker-build-no-cache

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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request aims to ensure consistent and clean Docker builds for the website and website-bundle services. By introducing the --no-cache flag to the Docker Compose build commands, it prevents the use of stale cached layers, leading to more reliable and predictable build outcomes for local development and deployment environments.

Highlights

  • Docker Build Process: The website and website-bundle npm scripts now explicitly use docker compose build --no-cache before bringing up the services. This ensures that Docker images are rebuilt from scratch, ignoring any cached layers.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cloudflare-workers-and-pages
Copy link

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 03a7f4d
Status:🚫  Deploy failed.

View logs

@codecov
Copy link

codecov bot commented Jan 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.19%. Comparing base (f6ab56c) to head (03a7f4d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1073   +/-   ##
=======================================
  Coverage   87.19%   87.19%           
=======================================
  Files         116      116           
  Lines        4350     4350           
  Branches     1011     1011           
=======================================
  Hits         3793     3793           
  Misses        557      557           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the website and website-bundle npm scripts to ensure clean Docker builds by adding the --no-cache flag. The change correctly separates the docker compose build and up commands to achieve this. I've provided one suggestion to improve the maintainability of these scripts by reducing repetition. Overall, the change is correct and achieves its intended purpose.

@claude
Copy link
Contributor

claude bot commented Jan 4, 2026

Code Review

Overall Assessment: LGTM with minor considerations

This is a straightforward and low-risk change that adds --no-cache to docker compose build commands to ensure clean builds.

Changes Reviewed

- "website": "docker compose -f website/compose.yml up --build",
+ "website": "docker compose -f website/compose.yml build --no-cache && docker compose -f website/compose.yml up",

What is Good

  1. Solves stale cache issues: Using --no-cache ensures developers always get fresh builds, which is particularly useful when Docker layer caching causes unexpected behavior with source file changes
  2. Simple and focused: The PR does one thing well
  3. No impact on production: These are development scripts only

Minor Considerations

Details

Trade-off: Build time vs. cache freshness

  • Using --no-cache means every run rebuilds from scratch, which increases build time
  • This is acceptable for development scripts where correctness is more important than speed
  • If build times become a pain point, developers can always run docker compose up directly when they know cache is fine

Alternative considered (informational only)

  • Could use --pull instead to pull fresh base images while keeping layer cache
  • However, --no-cache is the more thorough solution if stale cache was the actual issue

Premortem Analysis

Risk Likelihood Mitigation
Slower dev iteration Low Developers can bypass by running docker commands directly
Breaks on systems without docker N/A Already a requirement for these scripts

Checklist

  • Code follows project conventions
  • No security concerns
  • No test coverage needed (build scripts)
  • Change is well-documented in PR description

Verdict: Approve. The change is simple, focused, and solves a real problem. No issues identified.


Generated with Claude Code

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

39-40: Changes are technically correct but consider adding flexibility.

The changes successfully achieve the stated goal of ensuring clean builds by using --no-cache. However, this forces a complete rebuild every time, which can slow down development workflows where cached layers speed up iterations.

Consider providing more granular control for different scenarios:

💡 Suggested approach for flexibility

Option 1: Separate scripts for clean vs regular builds

-    "website": "docker compose -f website/compose.yml build --no-cache && docker compose -f website/compose.yml up",
-    "website-bundle": "docker compose -f website/compose.bundle.yml build --no-cache && docker compose -f website/compose.bundle.yml up",
+    "website": "docker compose -f website/compose.yml up --build",
+    "website:clean": "docker compose -f website/compose.yml build --no-cache && docker compose -f website/compose.yml up",
+    "website-bundle": "docker compose -f website/compose.bundle.yml up --build",
+    "website-bundle:clean": "docker compose -f website/compose.bundle.yml build --no-cache && docker compose -f website/compose.bundle.yml up",

This allows developers to use npm run website for quick iterations with caching and npm run website:clean when a clean build is needed.

Option 2: Environment variable control

-    "website": "docker compose -f website/compose.yml build --no-cache && docker compose -f website/compose.yml up",
-    "website-bundle": "docker compose -f website/compose.bundle.yml build --no-cache && docker compose -f website/compose.bundle.yml up",
+    "website": "docker compose -f website/compose.yml build ${DOCKER_NO_CACHE:+--no-cache} && docker compose -f website/compose.yml up",
+    "website-bundle": "docker compose -f website/compose.bundle.yml build ${DOCKER_NO_CACHE:+--no-cache} && docker compose -f website/compose.bundle.yml up",

This allows developers to run npm run website for cached builds or DOCKER_NO_CACHE=1 npm run website for clean builds.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6ab56c and 03a7f4d.

📒 Files selected for processing (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Test (macos-latest, 20.x)
  • GitHub Check: Test (ubuntu-latest, 22.x)
  • GitHub Check: Build and run (windows-latest, 25.x)
  • GitHub Check: Test (ubuntu-latest, 25.x)
  • GitHub Check: Test (macos-latest, 22.x)
  • GitHub Check: Test (windows-latest, 24.x)
  • GitHub Check: Build and run (macos-latest, 22.x)
  • GitHub Check: Test (windows-latest, 20.x)
  • GitHub Check: Test (windows-latest, 22.x)
  • GitHub Check: Memory Test
  • GitHub Check: Build and run (windows-latest, 22.x)
  • GitHub Check: Test with Bun (windows-latest, latest)
  • GitHub Check: claude-review
  • GitHub Check: Cloudflare Pages

@yamadashy yamadashy merged commit 4650cb0 into main Jan 4, 2026
58 of 59 checks passed
@yamadashy yamadashy deleted the chore/docker-build-no-cache branch January 4, 2026 11:30
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.

1 participant