File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
content/manuals/build/bake Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,47 @@ command.
96
96
$ docker buildx bake all
97
97
```
98
98
99
+ ## Pattern matching for targets and groups
100
+
101
+ Bake supports shell-style wildcard patterns when specifying target or grouped targets.
102
+ This makes it easier to build multiple targets without listing each one explicitly.
103
+
104
+ Supported patterns:
105
+
106
+ - ` * ` matches any sequence of characters
107
+ - ` ? ` matches any single character
108
+ - ` [abc] ` matches any character in brackets
109
+
110
+ > [ !NOTE]
111
+ >
112
+ > Always wrap wildcard patterns in quotes. Without quotes, your shell will expand the
113
+ > wildcard to match files in the current directory, which usually causes errors.
114
+
115
+ Examples:
116
+
117
+ ``` console
118
+ # Match all targets starting with ' foo-'
119
+ $ docker buildx bake " foo-*"
120
+
121
+ # Match all targets
122
+ $ docker buildx bake " *"
123
+
124
+ # Matches: foo-baz, foo-caz, foo-daz, etc.
125
+ $ docker buildx bake " foo-?az"
126
+
127
+ # Matches: foo-bar, boo-bar
128
+ $ docker buildx bake " [fb]oo-bar"
129
+
130
+ # Matches: mtx-a-b-d, mtx-a-b-e, mtx-a-b-f
131
+ $ docker buildx bake " mtx-a-b-*"
132
+ ```
133
+
134
+ You can also combine multiple patterns:
135
+
136
+ ``` console
137
+ $ docker buildx bake " foo*" " tests"
138
+ ```
139
+
99
140
## Additional resources
100
141
101
142
Refer to the following pages to learn more about Bake's features:
You can’t perform that action at this time.
0 commit comments