Skip to content

fix warnings during docker build #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2025
Merged

Conversation

Iceber
Copy link
Member

@Iceber Iceber commented Jun 20, 2025

What type of PR is this?

What this PR does / why we need it:

$ make images
...
 2 warnings found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 2)
 - InvalidDefaultArgInFrom: Default value for ARG ${BUILDER_IMAGE} results in empty or invalid base image name (line 2)
...

https://docs.docker.com/reference/build-checks/invalid-default-arg-in-from/
https://docs.docker.com/reference/build-checks/from-as-casing/
Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@clusterpedia-bot
Copy link

Hi @Iceber,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@Iceber Iceber requested a review from Copilot June 20, 2025 07:02
Copilot

This comment was marked as outdated.

@Iceber Iceber requested a review from Copilot June 20, 2025 07:08
Copy link

@Copilot 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 updates the Dockerfile to suppress build-time warnings by providing a default builder image and correcting keyword casing.

  • Adds a non-existent default for BUILDER_IMAGE to avoid the InvalidDefaultArgInFrom warning
  • Updates the FROM ... as builder line to use uppercase AS to satisfy the FromAsCasing checker
  • Includes comments explaining the chosen defaults and warning references
Comments suppressed due to low confidence (2)

Dockerfile:5

  • [nitpick] It may not be immediately clear that changing as to uppercase AS fixes the FromAsCasing warning. Consider adding a brief comment explaining that requirement or merging it with the existing comment block.
FROM --platform=$BUILDPLATFORM ${BUILDER_IMAGE} AS builder

Dockerfile:4

  • The quotes around clusterpedia.io/builder:not-build become part of the default value, leading to an invalid image name. Remove the quotes so the ARG reads ARG BUILDER_IMAGE=clusterpedia.io/builder:not-build.
ARG BUILDER_IMAGE="clusterpedia.io/builder:not-build"

@Iceber Iceber merged commit 9b5c9b7 into clusterpedia-io:main Jun 20, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants