Skip to content
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

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

Open
1 task done
vishalnandagopal opened this issue Mar 7, 2025 · 0 comments
Open
1 task done
Labels
status/triage Needs triage

Comments

@vishalnandagopal
Copy link

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.

@vishalnandagopal vishalnandagopal added the status/triage Needs triage label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

1 participant