Skip to content

correctly remove duplicated secrets and ssh keys #3032

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
Mar 4, 2025

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Feb 28, 2025

target "default" {
  secret = [
    "id=FOO,env=FOO",
    "id=FOO,env=BAR",
    "id=BAR,env=BAZ"
  ]
}

Currently:

$ docker buildx bake --print
#1 [internal] load local bake definitions
#1 reading docker-bake.hcl 103B / 103B done
#1 DONE 0.0s
{
  "group": {
    "default": {
      "targets": [
        "default"
      ]
    }
  },
  "target": {
    "default": {
      "context": ".",
      "dockerfile": "Dockerfile",
      "secret": [
        {
          "id": "FOO",
          "env": "FOO"
        },
        {
          "id": "FOO",
          "env": "BAR"
        },
        {
          "id": "BAR",
          "env": "BAZ"
        }
      ]
    }
  }
}

With this change:

$ docker buildx bake --print
#1 [internal] load local bake definitions
#1 reading docker-bake.hcl 103B / 103B done
#1 DONE 0.0s
{
  "group": {
    "default": {
      "targets": [
        "default"
      ]
    }
  },
  "target": {
    "default": {
      "context": ".",
      "dockerfile": "Dockerfile",
      "secret": [
        {
          "id": "FOO",
          "env": "BAR"
        },
        {
          "id": "BAR",
          "env": "BAZ"
        }
      ]
    }
  }
}

@crazy-max crazy-max marked this pull request as ready for review February 28, 2025 13:50
@crazy-max crazy-max added this to the v0.22.0 milestone Feb 28, 2025
@crazy-max crazy-max changed the title bake: correctly remove duplicated secrets correctly remove duplicated secrets Feb 28, 2025
@crazy-max crazy-max changed the title correctly remove duplicated secrets correctly remove duplicated secrets and ssh keys Feb 28, 2025
@tonistiigi tonistiigi merged commit 48a591b into docker:master Mar 4, 2025
131 checks passed
@jabidahscreationssystems

All set to go.

@crazy-max crazy-max deleted the bake-secrets-dupes branch March 13, 2025 17:06
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.

3 participants