Skip to content

Incorrect document content for bake/inheritence/overriding-inherited-attributes #22203

Open
@Aden-Q

Description

@Aden-Q

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

In the bake/inheritance/overriding-inherited-attributes section of the document. The given docker-bake.hcl declaration example shows a app-dev target inherited from the _common target:

// docker-bake.hcl
target "app-dev" {
  inherits = ["_common"]
  args = {
    GO_VERSION = "1.17"
  }
  tags = ["docker.io/username/myapp:dev"]
}

Howver, the description below:

The GO_VERSION argument in app-release is set to 1.17, overriding the GO_VERSION argument from the app-dev target.

The description is not related to the example given about.

Location

https://docs.docker.com/build/bake/inheritance/

Suggestion

Either by giving an new example docker-bake.hcl so it's related to the description:

// docker-bake.hcl
target "app-release" {
  inherits = ["app-dev"]
  args = {
    GO_VERSION = "1.17"
  }
  tags = ["docker.io/username/myapp:dev"]
}

Or by rewording the description:

The GO_VERSION argument in app-devis set to 1.17, overriding the GO_VERSION argument from the _common target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildRelates to Dockerfiles or docker build commandstatus/triageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions