Skip to content

Conversation

@sandockerfile
Copy link
Contributor

@sandockerfile sandockerfile commented Oct 10, 2025

Optimize Dockerfile to maximize cache utilization and parallelism and add ARG to control mirrors

@88250 88250 requested a review from Copilot October 14, 2025 03:10
Copy link

Copilot AI left a comment

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 optimizes the Dockerfile to improve build performance through better cache utilization and parallel builds. The changes restructure the build process to leverage Docker's layer caching more effectively and introduce configurable build arguments for registry mirrors.

Key changes:

  • Restructured build stages to optimize Docker layer caching by copying dependencies before source code
  • Added configurable ARG parameters for NPM_REGISTRY and GOPROXY to support build-time mirror configuration
  • Implemented build cache mounts and multi-platform build support for improved performance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sandockerfile
Copy link
Contributor Author

The missing .npmrc has been added

go env -w GOPROXY= and npm config set registry both accept empty values. In such cases, the setting will be cleared (i.e., the default value will be used)

app/pnpm* pattern matchs pnpm-workspace.yaml and other pnpm configuration files (that may exist in the future)

@88250 88250 added this to the 3.3.6 milestone Oct 14, 2025
@88250 88250 merged commit 986a220 into siyuan-note:dev Oct 14, 2025
@88250
Copy link
Member

88250 commented Oct 14, 2025

感谢你的贡献,思源有你更精彩!
Thank you for your contribution. SiYuan will be more wonderful with you!

@88250
Copy link
Member

88250 commented Oct 29, 2025

Error after publishing:

image

ff0bcce Works normally after removal.

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.

2 participants