-
Notifications
You must be signed in to change notification settings - Fork 8.1k
bake: add pattern matching for targets input #23360
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -96,6 +96,42 @@ command. | |||||
| $ docker buildx bake all | ||||||
| ``` | ||||||
|
|
||||||
| ## Pattern matching for targets and groups | ||||||
|
|
||||||
| Bake supports shell-style wildcard patterns when specifying target or grouped targets. | ||||||
| This makes it easier to build multiple targets without listing each one explicitly. | ||||||
|
|
||||||
| Supported patterns: | ||||||
|
|
||||||
| - `*` matches any sequence of characters | ||||||
| - `?` matches any single character | ||||||
| - `[abc]` matches any character in brackets | ||||||
|
|
||||||
| Examples: | ||||||
|
|
||||||
| ```console | ||||||
| # Match all targets starting with 'foo-' | ||||||
| $ docker buildx bake foo-* | ||||||
|
|
||||||
| # Match all targets | ||||||
| $ docker buildx bake * | ||||||
|
||||||
| $ docker buildx bake * | |
| $ docker buildx bake "*" |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| You can also combine multiple patters: | |
| You can also combine multiple patterns: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests would not be necessary here as we glob everything already. Maybe instead:
| $ docker buildx bake "*" "tests" | |
| $ docker buildx bake "foo*" "tests" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.