GeezerVison is showing github.com — build: opt to set progress warnings in response by crazy-max · Pull Request #2551 · docker/buildx
Conversation
crazy-max
commented
Jun 24, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
alternative to #2511 and similar to #2280, we can set build checks warnings in the metadata file. Does not set them by default but can be enabled by using the BUILDX_METADATA_WARNINGS=1 environment variable.
This will be useful with our GitHub Actions so we can generate GitHub Annotations without having to do a subrequest build like in https://github.com/crazy-max/docker-build-push-action/pull/39/files#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR132
@tonistiigi Also added extra commit to dedup warnings for bake related to #2534 (comment)
# syntax=docker/dockerfile-upstream:master
frOM busybox as base
cOpy Dockerfile .
from scratch
COPy --from=base \
/Dockerfile \
/
$ BUILDX_METADATA_WARNINGS=1 docker buildx build . --metadata-file md.json
...
#12 exporting to image
#12 exporting layers done
#12 writing image sha256:d0bb2193d26744307a7003c5397e277d1fa73ee979851b0c2ed2afad89d2e44b done
#12 DONE 0.0s
#13 resolving provenance for metadata file
#13 DONE 0.0s
3 warnings found (use --debug to expand):
- ConsistentInstructionCasing: Command 'frOM' should be consistently cased (line 2)
- ConsistentInstructionCasing: Command 'cOpy' should be consistently cased (line 3)
- ConsistentInstructionCasing: Command 'COPy' should be consistently cased (line 6)
View build details: docker-desktop://dashboard/build/default/default/wuiiyvfzfof6q93b69sp97n2l
md.json
{
"buildx.build.provenance": {
"buildType": "https://mobyproject.org/buildkit@v1",
"materials": [
{
"uri": "pkg:docker/docker/dockerfile-upstream@master",
"digest": {
"sha256": "c2da757515621f3767427a157f351149ff48a69e0550afa08fa768feaaf466c7"
}
},
{
"uri": "pkg:docker/busybox@latest?platform=linux%2Famd64",
"digest": {
"sha256": "9ae97d36d26566ff84e8893c64a6dc4fe8ca6d1144bf5b87b2b85a32def253c7"
}
}
],
"invocation": {
"configSource": {
"entryPoint": "Dockerfile"
},
"parameters": {
"frontend": "gateway.v0",
"args": {
"cmdline": "docker/dockerfile-upstream:master",
"source": "docker/dockerfile-upstream:master"
},
"locals": [
{
"name": "context"
},
{
"name": "dockerfile"
}
]
},
"environment": {
"platform": "linux/amd64"
}
}
},
"buildx.build.ref": "default/default/uht6rrrauxl76794yt2cf0phh",
"buildx.build.warnings": [
{
"vertex": "sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811",
"level": 1,
"short": "Q29uc2lzdGVudEluc3RydWN0aW9uQ2FzaW5nOiBDb21tYW5kICdmck9NJyBzaG91bGQgbWF0Y2ggdGhlIGNhc2Ugb2YgdGhlIGNvbW1hbmQgbWFqb3JpdHkgKGxvd2VyY2FzZSkgKGxpbmUgMik=",
"detail": [
"QWxsIGNvbW1hbmRzIHdpdGhpbiB0aGUgRG9ja2VyZmlsZSBzaG91bGQgdXNlIHRoZSBzYW1lIGNhc2luZyAoZWl0aGVyIHVwcGVyIG9yIGxvd2VyKQ=="
],
"url": "https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/",
"sourceInfo": {
"filename": "Dockerfile",
"data": "IyBzeW50YXg9ZG9ja2VyL2RvY2tlcmZpbGUtdXBzdHJlYW06bWFzdGVyCmZyT00gYnVzeWJveCBhcyBiYXNlCmNPcHkgRG9ja2VyZmlsZSAuCgpmcm9tIHNjcmF0Y2gKQ09QeSAtLWZyb209YmFzZSBcCiAgL0RvY2tlcmZpbGUgXAogIC8K",
"definition": {
"def": [
"GsUBChJsb2NhbDovL2RvY2tlcmZpbGUSFAoMbG9jYWwuZGlmZmVyEgRub25lEkoKEWxvY2FsLmZvbGxvd3BhdGhzEjVbIkRvY2tlcmZpbGUiLCJEb2NrZXJmaWxlLmRvY2tlcmlnbm9yZSIsImRvY2tlcmZpbGUiXRIqCg1sb2NhbC5zZXNzaW9uEhlmc3RoeWprejN4cnhseGRzYXo4dTY4cTZiEiEKE2xvY2FsLnNoYXJlZGtleWhpbnQSCmRvY2tlcmZpbGVaAA==",
"CkkKR3NoYTI1Njo4MjdhNjU0MGRjZTRmN2VjYTc0ZThmOWNlYWMxYmI3OTkxMTFkZDZhYzc0MzA4NTYyNzI0ZTMwODUwMzY1ODEx"
],
"metadata": {
"sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811": {
"description": {
"llb.customname": "[internal] load build definition from Dockerfile"
},
"caps": {
"source.local": true,
"source.local.followpaths": true,
"source.local.sessionid": true,
"source.local.sharedkeyhint": true
}
},
"sha256:b69ed3ecdd80d38494845bb389b30138acb204eaaa5fecb9a52fccd7bd72f65d": {
"caps": {
"constraints": true,
"meta.description": true,
"platform": true
}
}
},
"Source": {
"locations": {
"sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811": {}
}
}
},
"language": "Dockerfile"
},
"range": [
{
"start": {
"line": 2
},
"end": {
"line": 2
}
}
]
},
{
"vertex": "sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811",
"level": 1,
"short": "Q29uc2lzdGVudEluc3RydWN0aW9uQ2FzaW5nOiBDb21tYW5kICdjT3B5JyBzaG91bGQgbWF0Y2ggdGhlIGNhc2Ugb2YgdGhlIGNvbW1hbmQgbWFqb3JpdHkgKGxvd2VyY2FzZSkgKGxpbmUgMyk=",
"detail": [
"QWxsIGNvbW1hbmRzIHdpdGhpbiB0aGUgRG9ja2VyZmlsZSBzaG91bGQgdXNlIHRoZSBzYW1lIGNhc2luZyAoZWl0aGVyIHVwcGVyIG9yIGxvd2VyKQ=="
],
"url": "https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/",
"sourceInfo": {
"filename": "Dockerfile",
"data": "IyBzeW50YXg9ZG9ja2VyL2RvY2tlcmZpbGUtdXBzdHJlYW06bWFzdGVyCmZyT00gYnVzeWJveCBhcyBiYXNlCmNPcHkgRG9ja2VyZmlsZSAuCgpmcm9tIHNjcmF0Y2gKQ09QeSAtLWZyb209YmFzZSBcCiAgL0RvY2tlcmZpbGUgXAogIC8K",
"definition": {
"def": [
"GsUBChJsb2NhbDovL2RvY2tlcmZpbGUSFAoMbG9jYWwuZGlmZmVyEgRub25lEkoKEWxvY2FsLmZvbGxvd3BhdGhzEjVbIkRvY2tlcmZpbGUiLCJEb2NrZXJmaWxlLmRvY2tlcmlnbm9yZSIsImRvY2tlcmZpbGUiXRIqCg1sb2NhbC5zZXNzaW9uEhlmc3RoeWprejN4cnhseGRzYXo4dTY4cTZiEiEKE2xvY2FsLnNoYXJlZGtleWhpbnQSCmRvY2tlcmZpbGVaAA==",
"CkkKR3NoYTI1Njo4MjdhNjU0MGRjZTRmN2VjYTc0ZThmOWNlYWMxYmI3OTkxMTFkZDZhYzc0MzA4NTYyNzI0ZTMwODUwMzY1ODEx"
],
"metadata": {
"sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811": {
"description": {
"llb.customname": "[internal] load build definition from Dockerfile"
},
"caps": {
"source.local": true,
"source.local.followpaths": true,
"source.local.sessionid": true,
"source.local.sharedkeyhint": true
}
},
"sha256:b69ed3ecdd80d38494845bb389b30138acb204eaaa5fecb9a52fccd7bd72f65d": {
"caps": {
"constraints": true,
"meta.description": true,
"platform": true
}
}
},
"Source": {
"locations": {
"sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811": {}
}
}
},
"language": "Dockerfile"
},
"range": [
{
"start": {
"line": 3
},
"end": {
"line": 3
}
}
]
},
{
"vertex": "sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811",
"level": 1,
"short": "Q29uc2lzdGVudEluc3RydWN0aW9uQ2FzaW5nOiBDb21tYW5kICdDT1B5JyBzaG91bGQgbWF0Y2ggdGhlIGNhc2Ugb2YgdGhlIGNvbW1hbmQgbWFqb3JpdHkgKGxvd2VyY2FzZSkgKGxpbmUgNik=",
"detail": [
"QWxsIGNvbW1hbmRzIHdpdGhpbiB0aGUgRG9ja2VyZmlsZSBzaG91bGQgdXNlIHRoZSBzYW1lIGNhc2luZyAoZWl0aGVyIHVwcGVyIG9yIGxvd2VyKQ=="
],
"url": "https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/",
"sourceInfo": {
"filename": "Dockerfile",
"data": "IyBzeW50YXg9ZG9ja2VyL2RvY2tlcmZpbGUtdXBzdHJlYW06bWFzdGVyCmZyT00gYnVzeWJveCBhcyBiYXNlCmNPcHkgRG9ja2VyZmlsZSAuCgpmcm9tIHNjcmF0Y2gKQ09QeSAtLWZyb209YmFzZSBcCiAgL0RvY2tlcmZpbGUgXAogIC8K",
"definition": {
"def": [
"GsUBChJsb2NhbDovL2RvY2tlcmZpbGUSFAoMbG9jYWwuZGlmZmVyEgRub25lEkoKEWxvY2FsLmZvbGxvd3BhdGhzEjVbIkRvY2tlcmZpbGUiLCJEb2NrZXJmaWxlLmRvY2tlcmlnbm9yZSIsImRvY2tlcmZpbGUiXRIqCg1sb2NhbC5zZXNzaW9uEhlmc3RoeWprejN4cnhseGRzYXo4dTY4cTZiEiEKE2xvY2FsLnNoYXJlZGtleWhpbnQSCmRvY2tlcmZpbGVaAA==",
"CkkKR3NoYTI1Njo4MjdhNjU0MGRjZTRmN2VjYTc0ZThmOWNlYWMxYmI3OTkxMTFkZDZhYzc0MzA4NTYyNzI0ZTMwODUwMzY1ODEx"
],
"metadata": {
"sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811": {
"description": {
"llb.customname": "[internal] load build definition from Dockerfile"
},
"caps": {
"source.local": true,
"source.local.followpaths": true,
"source.local.sessionid": true,
"source.local.sharedkeyhint": true
}
},
"sha256:b69ed3ecdd80d38494845bb389b30138acb204eaaa5fecb9a52fccd7bd72f65d": {
"caps": {
"constraints": true,
"meta.description": true,
"platform": true
}
}
},
"Source": {
"locations": {
"sha256:827a6540dce4f7eca74e8f9ceac1bb799111dd6ac74308562724e30850365811": {}
}
}
},
"language": "Dockerfile"
},
"range": [
{
"start": {
"line": 6
},
"end": {
"line": 6
}
},
{
"start": {
"line": 7
},
"end": {
"line": 7
}
},
{
"start": {
"line": 8
},
"end": {
"line": 8
}
}
]
}
],
"containerimage.config.digest": "sha256:d0bb2193d26744307a7003c5397e277d1fa73ee979851b0c2ed2afad89d2e44b",
"containerimage.digest": "sha256:d0bb2193d26744307a7003c5397e277d1fa73ee979851b0c2ed2afad89d2e44b"
}
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 30, 2024
aevesdocker
pushed a commit
to docker/docs
that referenced
this pull request
Feb 18, 2025
<!--Delete sections as needed -->
## Description
Missing documentation for buildx metadata envs
## Related issues or tickets
follow up:
* docker/buildx#2280
* docker/buildx#2551
## Reviews
<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->
- [ ] Technical review
- [ ] Editorial review
- [ ] Product review
Signed-off-by: CrazyMax <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|