fix dashboard build - #499
Conversation
WalkthroughThe pull request introduces significant changes to the Dockerfile used for building Kubeapps. The base image for the initial build stage has been switched from Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (3)
packages/system/dashboard/images/kubeapps-apis/Dockerfile (3)
7-7: Consider making theVERSIONargument mandatoryHardcoding the default value for
VERSIONtov2.11.0might lead to unintentional builds of outdated versions if the argument is not overridden during the build process. Consider removing the default value to require explicit specification of the version.
10-10: Verify the integrity of the downloaded source codeTo ensure the security and integrity of the source code, consider verifying the checksum of the downloaded tarball before extraction. This can prevent corrupted or tampered files from affecting the build.
15-18: Consider applying patches in a forked repositoryApplying patches during the build process can lead to build failures if the upstream source code changes and the patches no longer apply cleanly. It may be more reliable to apply these patches in a forked repository and reference that repository as the build source.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
packages/system/dashboard/images/kubeapps-apis/Dockerfile(2 hunks)
🔇 Additional comments (3)
packages/system/dashboard/images/kubeapps-apis/Dockerfile (3)
6-6: Verify the suitability of using alpine as the base image
Switching to alpine as the base image in the source stage may lead to missing dependencies required for building or patching. Ensure that all necessary tools are available in alpine, or consider using an image with the necessary build utilities pre-installed.
20-20: Ensure Go version compatibility
The Go version has been changed from 1.23.2 to 1.22.5. Please verify that the source code is compatible with Go 1.22.5 and that downgrading does not introduce any compatibility issues.
22-22: Confirm the use of module files from the source stage
Copying go.mod and go.sum from the source stage means any local modifications in your build context's module files will be ignored. Ensure this is intentional and that you are not missing local dependencies or overrides.
| COPY --from=source /source/pkg pkg | ||
| COPY --from=source /source/cmd cmd |
There was a problem hiding this comment.
Local code modifications may be ignored due to copying from the source stage
By copying the pkg and cmd directories from the source stage, any local changes in your build context will not be included in the build. If you intend to include local modifications, consider copying these directories from the build context instead.
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced build process for Kubeapps with improved modularity and patch integration. - Introduced version specification for Kubeapps builds. - **Bug Fixes** - Streamlined plugin build commands for better performance and clarity. - **Refactor** - Restructured Dockerfile to utilize different base images and optimize the build stages. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Bug Fixes
Refactor