Skip to content

target.dockerfile: Mention that this path is relative to the context provided #22199

@vishalnandagopal

Description

@vishalnandagopal

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Other

Description

It's not clear that the path we provide here is relative to the context attribute, if provided. This caused some trouble since the build was failing without a clear reason, and was only evident by seeing the path again in the error.

Eg:

target "default" {
  dockerfile = "app/src/www/Dockerfile"
  context = "app"
}

Location

https://docs.docker.com/build/bake/reference/#targetdockerfile

Suggestion

The error was something like app/app does not exist so I thought the dockerfile was relative to the context. It would be useful if this was explicitly mentioned.

In general, now that bake is GA, it needs a much more beginner (me) friendly docs. Other things that were not clear and seemed unnecessary include - Default group is compulsory if multiple targets are present. This was not at all clear from the error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions