Skip to content

Correct the schema for the output attribute in Bake files #77

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

Open
rcjsuen opened this issue Apr 20, 2025 · 0 comments
Open

Correct the schema for the output attribute in Bake files #77

rcjsuen opened this issue Apr 20, 2025 · 0 comments
Labels

Comments

@rcjsuen
Copy link
Collaborator

rcjsuen commented Apr 20, 2025

"output": {
IsOptional: true,
Constraint: schema.List{Elem: schema.AnyExpression{OfType: cty.String}},
},

output is not just a list of strings. It seems like it can also be an object.

target "_common" {
  args = {
    GO_VERSION = "1.23"
    BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
  }
}

target "lint" {
  inherits = ["_common"]
  dockerfile = "./dockerfiles/lint.Dockerfile"
  output = [{ type = "cacheonly" }]
}

target "docs" {
  inherits = ["_common"]
  dockerfile = "./dockerfiles/docs.Dockerfile"
  output = ["./docs/reference"]
}
{
  "context": ".",
  "dockerfile": "./dockerfiles/docs.Dockerfile",
  "args": {
    "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
    "GO_VERSION": "1.23"
  },
  "output": [
    {
      "dest": "./docs/reference",
      "type": "local"
    }
  ]
}
{
  "context": ".",
  "dockerfile": "./dockerfiles/lint.Dockerfile",
  "args": {
    "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
    "GO_VERSION": "1.23"
  },
  "output": [
    {
      "type": "cacheonly"
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant