Skip to content

Commit 6f00061

Browse files
authored
Merge pull request #16 from crazy-max/custom-usage
annotation to specify code delimiter for flag usage
2 parents 383716c + c712d9e commit 6f00061

File tree

10 files changed

+315
-72
lines changed

10 files changed

+315
-72
lines changed

annotation/annotation.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2021 cli-docs-tool authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package annotation
16+
17+
const (
18+
// ExternalURL specifies an external link annotation
19+
ExternalURL = "docs.external.url"
20+
// CodeDelimiter specifies the char that will be converted as code backtick.
21+
// Can be used on cmd for inheritance or a specific flag.
22+
CodeDelimiter = "docs.code-delimiter"
23+
)

clidocstool.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ import (
2222
"github.com/spf13/cobra"
2323
)
2424

25-
const (
26-
// AnnotationExternalUrl specifies an external link annotation
27-
AnnotationExternalUrl = "docs.external.url"
28-
)
29-
3025
// Options defines options for cli-docs-tool
3126
type Options struct {
3227
Root *cobra.Command

clidocstool_md.go

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"strings"
2525
"text/template"
2626

27+
"github.com/docker/cli-docs-tool/annotation"
2728
"github.com/spf13/cobra"
2829
"github.com/spf13/pflag"
2930
)
@@ -51,6 +52,18 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error {
5152
sourcePath := filepath.Join(c.source, mdFile)
5253
targetPath := filepath.Join(c.target, mdFile)
5354

55+
// check recursively to handle inherited annotations
56+
for curr := cmd; curr != nil; curr = curr.Parent() {
57+
if _, ok := cmd.Annotations[annotation.CodeDelimiter]; !ok {
58+
if cd, cok := curr.Annotations[annotation.CodeDelimiter]; cok {
59+
if cmd.Annotations == nil {
60+
cmd.Annotations = map[string]string{}
61+
}
62+
cmd.Annotations[annotation.CodeDelimiter] = cd
63+
}
64+
}
65+
}
66+
5467
if !fileExists(sourcePath) {
5568
var icBuf bytes.Buffer
5669
icTpl, err := template.New("ic").Option("missingkey=error").Parse(`# {{ .Command }}
@@ -120,7 +133,7 @@ func mdFilename(cmd *cobra.Command) string {
120133

121134
func mdMakeLink(txt, link string, f *pflag.Flag, isAnchor bool) string {
122135
link = "#" + link
123-
annotations, ok := f.Annotations[AnnotationExternalUrl]
136+
annotations, ok := f.Annotations[annotation.ExternalURL]
124137
if ok && len(annotations) > 0 {
125138
link = annotations[0]
126139
} else {
@@ -186,7 +199,13 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
186199
}
187200
name += "`"
188201
name = mdMakeLink(name, f.Name, f, isLink)
189-
fmt.Fprintf(b, "%s | %s |\n", mdEscapePipe(name), mdEscapePipe(f.Usage))
202+
usage := f.Usage
203+
if cd, ok := f.Annotations[annotation.CodeDelimiter]; ok {
204+
usage = strings.ReplaceAll(usage, cd[0], "`")
205+
} else if cd, ok := cmd.Annotations[annotation.CodeDelimiter]; ok {
206+
usage = strings.ReplaceAll(usage, cd, "`")
207+
}
208+
fmt.Fprintf(b, "%s | %s |\n", mdEscapePipe(name), mdEscapePipe(usage))
190209
})
191210
fmt.Fprintln(b, "")
192211
}

clidocstool_test.go

Lines changed: 98 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"path/filepath"
2222
"testing"
2323

24+
"github.com/docker/cli-docs-tool/annotation"
2425
"github.com/spf13/cobra"
2526
"github.com/stretchr/testify/assert"
2627
"github.com/stretchr/testify/require"
@@ -47,7 +48,11 @@ func init() {
4748
}
4849
buildxCmd = &cobra.Command{
4950
Use: "buildx",
50-
Short: "Build with BuildKit",
51+
Short: "Docker Buildx",
52+
Long: `Extended build capabilities with BuildKit`,
53+
Annotations: map[string]string{
54+
annotation.CodeDelimiter: `"`,
55+
},
5156
}
5257
buildxBuildCmd = &cobra.Command{
5358
Use: "build [OPTIONS] PATH | URL | -",
@@ -65,39 +70,103 @@ func init() {
6570
buildxPFlags.String("builder", os.Getenv("BUILDX_BUILDER"), "Override the configured builder instance")
6671

6772
buildxBuildFlags := buildxBuildCmd.Flags()
68-
buildxBuildFlags.Bool("push", false, "Shorthand for --output=type=registry")
69-
buildxBuildFlags.Bool("load", false, "Shorthand for --output=type=docker")
70-
buildxBuildFlags.StringArrayP("tag", "t", []string{}, "Name and optionally a tag in the 'name:tag' format")
71-
buildxBuildFlags.SetAnnotation("tag", AnnotationExternalUrl, []string{"https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t"})
73+
74+
var ignore string
75+
var ignoreSlice []string
76+
var ignoreBool bool
77+
var ignoreInt int64
78+
79+
buildxBuildFlags.StringSlice("add-host", []string{}, `Add a custom host-to-IP mapping (format: 'host:ip')`)
80+
buildxBuildFlags.SetAnnotation("add-host", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host"})
81+
buildxBuildFlags.SetAnnotation("add-host", annotation.CodeDelimiter, []string{`'`})
82+
83+
buildxBuildFlags.StringSlice("allow", []string{}, `Allow extra privileged entitlement (e.g., "network.host", "security.insecure")`)
84+
7285
buildxBuildFlags.StringArray("build-arg", []string{}, "Set build-time variables")
73-
buildxBuildFlags.SetAnnotation("build-arg", AnnotationExternalUrl, []string{"https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg"})
74-
buildxBuildFlags.StringP("file", "f", "", "Name of the Dockerfile (Default is 'PATH/Dockerfile')")
75-
buildxBuildFlags.SetAnnotation("file", AnnotationExternalUrl, []string{"https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f"})
86+
buildxBuildFlags.SetAnnotation("build-arg", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg"})
87+
88+
buildxBuildFlags.StringArray("cache-from", []string{}, `External cache sources (e.g., "user/app:cache", "type=local,src=path/to/dir")`)
89+
90+
buildxBuildFlags.StringArray("cache-to", []string{}, `Cache export destinations (e.g., "user/app:cache", "type=local,dest=path/to/dir")`)
91+
92+
buildxBuildFlags.String("cgroup-parent", "", "Optional parent cgroup for the container")
93+
buildxBuildFlags.SetAnnotation("cgroup-parent", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent"})
94+
95+
buildxBuildFlags.StringP("file", "f", "", `Name of the Dockerfile (default: "PATH/Dockerfile")`)
96+
buildxBuildFlags.SetAnnotation("file", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f"})
97+
98+
buildxBuildFlags.String("iidfile", "", "Write the image ID to the file")
99+
76100
buildxBuildFlags.StringArray("label", []string{}, "Set metadata for an image")
77-
buildxBuildFlags.StringArray("cache-from", []string{}, "External cache sources (eg. user/app:cache, type=local,src=path/to/dir)")
78-
buildxBuildFlags.StringArray("cache-to", []string{}, "Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)")
79-
buildxBuildFlags.String("target", "", "Set the target build stage to build.")
80-
buildxBuildFlags.SetAnnotation("target", AnnotationExternalUrl, []string{"https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target"})
81-
buildxBuildFlags.StringSlice("allow", []string{}, "Allow extra privileged entitlement, e.g. network.host, security.insecure")
101+
102+
buildxBuildFlags.Bool("load", false, `Shorthand for "--output=type=docker"`)
103+
104+
buildxBuildFlags.String("network", "default", `Set the networking mode for the "RUN" instructions during build`)
105+
106+
buildxBuildFlags.StringArrayP("output", "o", []string{}, `Output destination (format: "type=local,dest=path")`)
107+
82108
buildxBuildFlags.StringArray("platform", []string{}, "Set target platform for build")
83-
buildxBuildFlags.StringArray("secret", []string{}, "Secret file to expose to the build: id=mysecret,src=/local/secret")
84-
buildxBuildFlags.StringArray("ssh", []string{}, "SSH agent socket or keys to expose to the build (format: `default|<id>[=<socket>|<key>[,<key>]]`)")
85-
buildxBuildFlags.StringArrayP("output", "o", []string{}, "Output destination (format: type=local,dest=path)")
86-
// not implemented
87-
buildxBuildFlags.String("network", "default", "Set the networking mode for the RUN instructions during build")
88-
buildxBuildFlags.StringSlice("add-host", []string{}, "Add a custom host-to-IP mapping (host:ip)")
89-
buildxBuildFlags.SetAnnotation("add-host", AnnotationExternalUrl, []string{"https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host"})
90-
buildxBuildFlags.String("iidfile", "", "Write the image ID to the file")
91-
// hidden flags
109+
110+
buildxBuildFlags.Bool("push", false, `Shorthand for "--output=type=registry"`)
111+
92112
buildxBuildFlags.BoolP("quiet", "q", false, "Suppress the build output and print image ID on success")
93-
buildxBuildFlags.MarkHidden("quiet")
94-
buildxBuildFlags.Bool("squash", false, "Squash newly built layers into a single new layer")
95-
buildxBuildFlags.MarkHidden("squash")
96-
buildxBuildFlags.String("ulimit", "", "Ulimit options")
97-
buildxBuildFlags.MarkHidden("ulimit")
98-
buildxBuildFlags.StringSlice("security-opt", []string{}, "Security options")
113+
114+
buildxBuildFlags.StringArray("secret", []string{}, `Secret file to expose to the build (format: "id=mysecret,src=/local/secret")`)
115+
116+
buildxBuildFlags.StringVar(&ignore, "shm-size", "", `Size of "/dev/shm"`)
117+
118+
buildxBuildFlags.StringArray("ssh", []string{}, `SSH agent socket or keys to expose to the build (format: "default|<id>[=<socket>|<key>[,<key>]]")`)
119+
120+
buildxBuildFlags.StringArrayP("tag", "t", []string{}, `Name and optionally a tag (format: "name:tag")`)
121+
buildxBuildFlags.SetAnnotation("tag", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t"})
122+
123+
buildxBuildFlags.String("target", "", "Set the target build stage to build.")
124+
buildxBuildFlags.SetAnnotation("target", annotation.ExternalURL, []string{"https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target"})
125+
126+
buildxBuildFlags.StringVar(&ignore, "ulimit", "", "Ulimit options")
127+
128+
// hidden flags
129+
buildxBuildFlags.BoolVar(&ignoreBool, "compress", false, "Compress the build context using gzip")
130+
buildxBuildFlags.MarkHidden("compress")
131+
132+
buildxBuildFlags.StringVar(&ignore, "isolation", "", "Container isolation technology")
133+
buildxBuildFlags.MarkHidden("isolation")
134+
buildxBuildFlags.SetAnnotation("isolation", "flag-warn", []string{"isolation flag is deprecated with BuildKit."})
135+
136+
buildxBuildFlags.StringSliceVar(&ignoreSlice, "security-opt", []string{}, "Security options")
99137
buildxBuildFlags.MarkHidden("security-opt")
100-
buildxBuildFlags.Bool("compress", false, "Compress the build context using gzip")
138+
buildxBuildFlags.SetAnnotation("security-opt", "flag-warn", []string{`security-opt flag is deprecated. "RUN --security=insecure" should be used with BuildKit.`})
139+
140+
buildxBuildFlags.BoolVar(&ignoreBool, "squash", false, "Squash newly built layers into a single new layer")
141+
buildxBuildFlags.MarkHidden("squash")
142+
buildxBuildFlags.SetAnnotation("squash", "flag-warn", []string{"experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency."})
143+
144+
buildxBuildFlags.StringVarP(&ignore, "memory", "m", "", "Memory limit")
145+
buildxBuildFlags.MarkHidden("memory")
146+
147+
buildxBuildFlags.StringVar(&ignore, "memory-swap", "", `Swap limit equal to memory plus swap: "-1" to enable unlimited swap`)
148+
buildxBuildFlags.MarkHidden("memory-swap")
149+
150+
buildxBuildFlags.Int64VarP(&ignoreInt, "cpu-shares", "c", 0, "CPU shares (relative weight)")
151+
buildxBuildFlags.MarkHidden("cpu-shares")
152+
153+
buildxBuildFlags.Int64Var(&ignoreInt, "cpu-period", 0, "Limit the CPU CFS (Completely Fair Scheduler) period")
154+
buildxBuildFlags.MarkHidden("cpu-period")
155+
156+
buildxBuildFlags.Int64Var(&ignoreInt, "cpu-quota", 0, "Limit the CPU CFS (Completely Fair Scheduler) quota")
157+
buildxBuildFlags.MarkHidden("cpu-quota")
158+
159+
buildxBuildFlags.StringVar(&ignore, "cpuset-cpus", "", `CPUs in which to allow execution ("0-3", "0,1")`)
160+
buildxBuildFlags.MarkHidden("cpuset-cpus")
161+
162+
buildxBuildFlags.StringVar(&ignore, "cpuset-mems", "", `MEMs in which to allow execution ("0-3", "0,1")`)
163+
buildxBuildFlags.MarkHidden("cpuset-mems")
164+
165+
buildxBuildFlags.BoolVar(&ignoreBool, "rm", true, "Remove intermediate containers after a successful build")
166+
buildxBuildFlags.MarkHidden("rm")
167+
168+
buildxBuildFlags.BoolVar(&ignoreBool, "force-rm", false, "Always remove intermediate containers")
169+
buildxBuildFlags.MarkHidden("force-rm")
101170

102171
buildxCmd.AddCommand(buildxBuildCmd)
103172
buildxCmd.AddCommand(buildxStopCmd)

clidocstool_yaml.go

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"sort"
2525
"strings"
2626

27+
"github.com/docker/cli-docs-tool/annotation"
2728
"github.com/spf13/cobra"
2829
"github.com/spf13/pflag"
2930
"gopkg.in/yaml.v2"
@@ -165,7 +166,7 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error {
165166
cliDoc.Usage = cmd.UseLine()
166167
}
167168

168-
// Check recursively so that, e.g., `docker stack ls` returns the same output as `docker stack`
169+
// check recursively to handle inherited annotations
169170
for curr := cmd; curr != nil; curr = curr.Parent() {
170171
if v, ok := curr.Annotations["version"]; ok && cliDoc.MinAPIVersion == "" {
171172
cliDoc.MinAPIVersion = v
@@ -185,6 +186,14 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error {
185186
if o, ok := curr.Annotations["ostype"]; ok && cliDoc.OSType == "" {
186187
cliDoc.OSType = o
187188
}
189+
if _, ok := cmd.Annotations[annotation.CodeDelimiter]; !ok {
190+
if cd, cok := curr.Annotations[annotation.CodeDelimiter]; cok {
191+
if cmd.Annotations == nil {
192+
cmd.Annotations = map[string]string{}
193+
}
194+
cmd.Annotations[annotation.CodeDelimiter] = cd
195+
}
196+
}
188197
}
189198

190199
anchors := make(map[string]struct{})
@@ -196,11 +205,11 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error {
196205

197206
flags := cmd.NonInheritedFlags()
198207
if flags.HasFlags() {
199-
cliDoc.Options = genFlagResult(flags, anchors)
208+
cliDoc.Options = genFlagResult(cmd, flags, anchors)
200209
}
201210
flags = cmd.InheritedFlags()
202211
if flags.HasFlags() {
203-
cliDoc.InheritedOptions = genFlagResult(flags, anchors)
212+
cliDoc.InheritedOptions = genFlagResult(cmd, flags, anchors)
204213
}
205214

206215
if hasSeeAlso(cmd) {
@@ -238,7 +247,7 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error {
238247
return nil
239248
}
240249

241-
func genFlagResult(flags *pflag.FlagSet, anchors map[string]struct{}) []cmdOption {
250+
func genFlagResult(cmd *cobra.Command, flags *pflag.FlagSet, anchors map[string]struct{}) []cmdOption {
242251
var (
243252
result []cmdOption
244253
opt cmdOption
@@ -263,12 +272,19 @@ func genFlagResult(flags *pflag.FlagSet, anchors map[string]struct{}) []cmdOptio
263272
Option: flag.Name,
264273
ValueType: flag.Value.Type(),
265274
DefaultValue: forceMultiLine(flag.DefValue, defaultValueMaxWidth),
266-
Description: forceMultiLine(flag.Usage, descriptionMaxWidth),
267275
Deprecated: len(flag.Deprecated) > 0,
268276
Hidden: flag.Hidden,
269277
}
270278

271-
if v, ok := flag.Annotations[AnnotationExternalUrl]; ok && len(v) > 0 {
279+
usage := flag.Usage
280+
if cd, ok := flag.Annotations[annotation.CodeDelimiter]; ok {
281+
usage = strings.ReplaceAll(usage, cd[0], "`")
282+
} else if cd, ok := cmd.Annotations[annotation.CodeDelimiter]; ok {
283+
usage = strings.ReplaceAll(usage, cd, "`")
284+
}
285+
opt.Description = forceMultiLine(usage, descriptionMaxWidth)
286+
287+
if v, ok := flag.Annotations[annotation.ExternalURL]; ok && len(v) > 0 {
272288
opt.DetailsURL = strings.TrimPrefix(v[0], "https://docs.docker.com")
273289
} else if _, ok = anchors[flag.Name]; ok {
274290
opt.DetailsURL = "#" + flag.Name

example/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ func gen(opts *options) error {
4646

4747
// root command
4848
cmd := &cobra.Command{
49-
Use: "buildx",
50-
Short: "Build with BuildKit",
49+
Use: "docker [OPTIONS] COMMAND [ARG...]",
50+
Short: "The base command for the Docker CLI.",
5151
}
5252

5353
// subcommand for the plugin

fixtures/buildx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# docker buildx
22

33
<!---MARKER_GEN_START-->
4-
Build with BuildKit
4+
Extended build capabilities with BuildKit
55

66
### Subcommands
77

fixtures/buildx_build.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,28 @@ Start a build
1111

1212
| Name | Description |
1313
| --- | --- |
14-
| [`--add-host stringSlice`](https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host) | Add a custom host-to-IP mapping (host:ip) |
15-
| `--allow stringSlice` | Allow extra privileged entitlement, e.g. network.host, security.insecure |
14+
| [`--add-host stringSlice`](https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host) | Add a custom host-to-IP mapping (format: `host:ip`) |
15+
| `--allow stringSlice` | Allow extra privileged entitlement (e.g., `network.host`, `security.insecure`) |
1616
| [`--build-arg stringArray`](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg) | Set build-time variables |
1717
| `--builder string` | Override the configured builder instance |
18-
| `--cache-from stringArray` | External cache sources (eg. user/app:cache, type=local,src=path/to/dir) |
19-
| `--cache-to stringArray` | Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir) |
20-
| `--compress` | Compress the build context using gzip |
21-
| [`-f`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f), [`--file string`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f) | Name of the Dockerfile (Default is 'PATH/Dockerfile') |
18+
| `--cache-from stringArray` | External cache sources (e.g., `user/app:cache`, `type=local,src=path/to/dir`) |
19+
| `--cache-to stringArray` | Cache export destinations (e.g., `user/app:cache`, `type=local,dest=path/to/dir`) |
20+
| [`--cgroup-parent string`](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) | Optional parent cgroup for the container |
21+
| [`-f`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f), [`--file string`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f) | Name of the Dockerfile (default: `PATH/Dockerfile`) |
2222
| `--iidfile string` | Write the image ID to the file |
2323
| `--label stringArray` | Set metadata for an image |
24-
| `--load` | Shorthand for --output=type=docker |
25-
| `--network string` | Set the networking mode for the RUN instructions during build |
26-
| `-o`, `--output stringArray` | Output destination (format: type=local,dest=path) |
24+
| `--load` | Shorthand for `--output=type=docker` |
25+
| `--network string` | Set the networking mode for the `RUN` instructions during build |
26+
| `-o`, `--output stringArray` | Output destination (format: `type=local,dest=path`) |
2727
| `--platform stringArray` | Set target platform for build |
28-
| `--push` | Shorthand for --output=type=registry |
29-
| `--secret stringArray` | Secret file to expose to the build: id=mysecret,src=/local/secret |
28+
| `--push` | Shorthand for `--output=type=registry` |
29+
| `-q`, `--quiet` | Suppress the build output and print image ID on success |
30+
| `--secret stringArray` | Secret file to expose to the build (format: `id=mysecret,src=/local/secret`) |
31+
| `--shm-size string` | Size of `/dev/shm` |
3032
| `--ssh stringArray` | SSH agent socket or keys to expose to the build (format: `default\|<id>[=<socket>\|<key>[,<key>]]`) |
31-
| [`-t`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t), [`--tag stringArray`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t) | Name and optionally a tag in the 'name:tag' format |
33+
| [`-t`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t), [`--tag stringArray`](https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t) | Name and optionally a tag (format: `name:tag`) |
3234
| [`--target string`](https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target) | Set the target build stage to build. |
35+
| `--ulimit string` | Ulimit options |
3336

3437

3538
<!---MARKER_GEN_END-->

fixtures/docker_buildx.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
command: docker buildx
2-
short: Build with BuildKit
3-
long: Build with BuildKit
2+
short: Docker Buildx
3+
long: Extended build capabilities with BuildKit
44
pname: docker
55
plink: docker.yaml
66
cname:

0 commit comments

Comments
 (0)