-
Notifications
You must be signed in to change notification settings - Fork 297
Open
Description
The current Dockerfile.precommit produces a very large image. It includes full Go, Python, Node.js and Rust toolchains, plus various lint tools. This works functionally, but the image size makes CI pulls slower and increases overall maintenance cost.
It may be worth considering a lighter approach, for example:
- Use a slimmer base image.
- Use multi-stage builds and only copy the final tooling binaries.
- Install only the runtimes actually needed for the pre-commit hooks.
- Use released binaries (e.g., golangci-lint) instead of installing full toolchains.
These changes could keep the same functionality while significantly reducing image size.
@Xunzhuo @rootfs if possible, I would like to optimize it. 😫
rootfs and yuluo-yx