Skip to content
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

Fix warnings during docker build #244

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Fix warnings during docker build #244

merged 1 commit into from
Jul 19, 2024

Conversation

julianbrost
Copy link
Collaborator

Building the container image started showing the following two warning for me recently which are addressed by this commit:

2 warnings found (use --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 3)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 4)

Building the container image started showing the following two warning for me
recently which are addressed by this commit:

2 warnings found (use --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 3)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 4)
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Jul 19, 2024
Copy link
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, either my local Docker version is too old to show errors or I just failed at reproducing them. Even calling it by BUILDX_METADATA_WARNINGS=true docker build --no-cache -t icinga-notifications . does not do the thing.

However, your change looks good and seems to match the warnings. Thus, if it fixes the warnings on your side, I am fine with it. Both the old and the new Dockerfile works on my machine™.

@julianbrost
Copy link
Collaborator Author

Yeah, not sure what exactly brought the change. Currently, I'm on Docker 27.0.3 with buildx 0.15.1.

@julianbrost
Copy link
Collaborator Author

Combining my package manager logs and when I think I've seen the warning the first time, it could have been the Docker 26 → 27 upgrade. However, I didn't find something obvious in the changelog.

@julianbrost julianbrost merged commit 8ac042d into main Jul 19, 2024
26 checks passed
@julianbrost julianbrost deleted the dockerfile-warnings branch July 19, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants