Skip to content

feat: Dockerfile构建调整 - #7727

Merged
jinmao88 merged 1 commit into
vbenjs:mainfrom
jyqwq:feature/Dockerfile调整构建指令
Mar 25, 2026

Hidden character warning

The head ref may contain hidden characters: "feature/Dockerfile\u8c03\u6574\u6784\u5efa\u6307\u4ee4"
Merged

jinmao88 merged 1 commit into
vbenjs:mainfrom
jyqwq:feature/Dockerfile调整构建指令

Conversation

@jyqwq

@jyqwq jyqwq commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

当前系统中的Dockerfile在进行构建的时候会触发lefthook,但是lefthook是依赖git环境的,所以会导致构建报错,需要区分环境跳过lefthook。
Clipboard_Screenshot_1774410568

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ ✅ ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • [ ✅ ] If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • [ ✅ ] Run the tests with pnpm test.
  • [ ✅ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • [ ✅ ] My code follows the style guidelines of this project
  • [ ✅ ] I have performed a self-review of my own code
  • [ ✅ ] I have commented my code, particularly in hard-to-understand areas
  • [ ✅ ] I have made corresponding changes to the documentation
  • [ ✅ ] My changes generate no new warnings
  • [ ✅ ] I have added tests that prove my fix is effective or that my feature works
  • [ ✅ ] New and existing unit tests pass locally with my changes
  • [ ✅ ] Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Chores
    • Optimized build process to skip unnecessary installation steps in continuous integration environments
    • Updated Docker deployment configuration to improve build consistency

@changeset-bot

changeset-bot Bot commented Mar 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f2e9b3a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7ddfd1e5-dc38-4415-97b8-0f44c625f7ae

📥 Commits

Reviewing files that changed from the base of the PR and between 4c1e3b9 and f2e9b3a.

📒 Files selected for processing (2)
  • package.json
  • scripts/deploy/Dockerfile

📝 Walkthrough

Walkthrough

The changes modify CI environment behavior to prevent Git hook installation during containerized builds. The package.json script now conditionally runs lefthook installation using the is-ci utility, while the Dockerfile explicitly sets CI=true to trigger this conditional behavior.

Changes

Cohort / File(s) Summary
CI Environment Configuration
package.json, scripts/deploy/Dockerfile
Modified to skip Git hook installation in CI environments. package.json now conditionally runs pnpm exec lefthook install using the is-ci utility, and Dockerfile sets CI=true environment variable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • anncwb
  • vince292007
  • mynetfan
  • jinmao88

Poem

🐰 In Docker's realm where CI runs free,
We skip the hooks with glee, glee, glee!
No lefthook needed in the build,
The CI flag has spoken, fulfilled!
A tiny change, yet wise and neat,
Makes Docker builds much more fleet! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adjusting the Dockerfile build configuration to address lefthook issues in CI environments.
Description check ✅ Passed The description provides clear context about the problem (lefthook requiring git in Docker), explains the solution (environment distinction via CI variable), includes supporting evidence (error screenshot), and completes the template with appropriate metadata.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@jinmao88
jinmao88 merged commit 65287cf into vbenjs:main Mar 25, 2026
7 of 14 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants