Skip to content

Conversation

crazy-max
Copy link
Member

follow-up #3258 (comment)

Ref should not be required.

Before:

$ docker buildx history inspect attachment --type provenance
ERROR: accepts between 1 and 2 arg(s), received 0

After:

$ docker buildx history inspect attachment --type provenance
{
  "builder": {
    "id": ""
  },
  "buildType": "https://mobyproject.org/buildkit@v1",
  "materials": [
    {
      "uri": "pkg:docker/docker/dockerfile@1",
      "digest": {
        "sha256": "9857836c9ee4268391bb5b09f9f157f3c91bb15821bb77969642813b0d00518d"
      }
    },
    {
      "uri": "pkg:docker/alpine@3.21?platform=linux%2Famd64",
      "digest": {
        "sha256": "a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c"
      }
    },
    {
      "uri": "pkg:docker/golang@1.24-alpine3.21?platform=linux%2Famd64",
      "digest": {
        "sha256": "56a23791af0f77c87b049230ead03bd8c3ad41683415ea4595e84ce7eada121a"
      }
    }
  ],
  ...
}

@@ -118,9 +118,9 @@ func attachmentCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {
var options attachmentOptions

cmd := &cobra.Command{
Use: "attachment [OPTIONS] REF [DIGEST]",
Use: "attachment [OPTIONS] [REF] [DIGEST]",
Copy link
Member

Choose a reason for hiding this comment

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

I believe the format should be [REF [DIGEST]]

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max requested a review from tonistiigi June 24, 2025 14:07
@tonistiigi tonistiigi merged commit 63bb3db into docker:master Jun 24, 2025
140 checks passed
@crazy-max crazy-max deleted the fix-args-history branch June 24, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants