diff --git a/docs/reference/buildx.md b/docs/reference/buildx.md index 735912b9ba1..324cb013a04 100644 --- a/docs/reference/buildx.md +++ b/docs/reference/buildx.md @@ -9,24 +9,21 @@ Extended build capabilities with BuildKit ### Subcommands -| Name | Description | -|:-----------------------------------------------|:-------------------------------------------| -| [`_INTERNAL_SERVE`](buildx__INTERNAL_SERVE.md) | | -| [`bake`](buildx_bake.md) | Build from a file | -| [`build`](buildx_build.md) | Start a build | -| [`create`](buildx_create.md) | Create a new builder instance | -| [`debug-shell`](buildx_debug-shell.md) | Start a monitor | -| [`du`](buildx_du.md) | Disk usage | -| [`imagetools`](buildx_imagetools.md) | Commands to work on images in registry | -| [`inspect`](buildx_inspect.md) | Inspect current builder instance | -| [`install`](buildx_install.md) | Install buildx as a 'docker builder' alias | -| [`ls`](buildx_ls.md) | List builder instances | -| [`prune`](buildx_prune.md) | Remove build cache | -| [`rm`](buildx_rm.md) | Remove a builder instance | -| [`stop`](buildx_stop.md) | Stop builder instance | -| [`uninstall`](buildx_uninstall.md) | Uninstall the 'docker builder' alias | -| [`use`](buildx_use.md) | Set the current builder instance | -| [`version`](buildx_version.md) | Show buildx version information | +| Name | Description | +|:---------------------------------------|:---------------------------------------| +| [`bake`](buildx_bake.md) | Build from a file | +| [`build`](buildx_build.md) | Start a build | +| [`create`](buildx_create.md) | Create a new builder instance | +| [`debug-shell`](buildx_debug-shell.md) | Start a monitor | +| [`du`](buildx_du.md) | Disk usage | +| [`imagetools`](buildx_imagetools.md) | Commands to work on images in registry | +| [`inspect`](buildx_inspect.md) | Inspect current builder instance | +| [`ls`](buildx_ls.md) | List builder instances | +| [`prune`](buildx_prune.md) | Remove build cache | +| [`rm`](buildx_rm.md) | Remove a builder instance | +| [`stop`](buildx_stop.md) | Stop builder instance | +| [`use`](buildx_use.md) | Set the current builder instance | +| [`version`](buildx_version.md) | Show buildx version information | ### Options diff --git a/docs/reference/buildx_install.md b/docs/reference/buildx_install.md deleted file mode 100644 index 4f8f370db75..00000000000 --- a/docs/reference/buildx_install.md +++ /dev/null @@ -1,11 +0,0 @@ -# buildx install - -``` -docker buildx install -``` - - -Install buildx as a 'docker builder' alias - - - diff --git a/docs/reference/buildx_uninstall.md b/docs/reference/buildx_uninstall.md deleted file mode 100644 index 524762e357a..00000000000 --- a/docs/reference/buildx_uninstall.md +++ /dev/null @@ -1,11 +0,0 @@ -# buildx uninstall - -``` -docker buildx uninstall -``` - - -Uninstall the 'docker builder' alias - - - diff --git a/go.mod b/go.mod index bc4486a2c7b..0b77430f55b 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/containerd/typeurl/v2 v2.1.1 github.com/creack/pty v1.1.18 github.com/docker/cli v24.0.2+incompatible - github.com/docker/cli-docs-tool v0.5.1 + github.com/docker/cli-docs-tool v0.6.0 github.com/docker/distribution v2.8.2+incompatible github.com/docker/docker v24.0.2+incompatible github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index 422bc0842b8..3c5200525a3 100644 --- a/go.sum +++ b/go.sum @@ -152,8 +152,8 @@ github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa h1:L9 github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM= github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli-docs-tool v0.5.1 h1:jIk/cCZurZERhALPVKhqlNxTQGxn2kcI+56gE57PQXg= -github.com/docker/cli-docs-tool v0.5.1/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o= +github.com/docker/cli-docs-tool v0.6.0 h1:Z9x10SaZgFaB6jHgz3OWooynhSa40CsWkpe5hEnG/qA= +github.com/docker/cli-docs-tool v0.6.0/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= diff --git a/vendor/github.com/docker/cli-docs-tool/clidocstool_md.go b/vendor/github.com/docker/cli-docs-tool/clidocstool_md.go index 73d05c8a722..1dee58c06ca 100644 --- a/vendor/github.com/docker/cli-docs-tool/clidocstool_md.go +++ b/vendor/github.com/docker/cli-docs-tool/clidocstool_md.go @@ -53,6 +53,12 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error { return nil } + // Skip hidden command + if cmd.Hidden { + log.Printf("INFO: Skipping Markdown for %q (hidden command)", cmd.CommandPath()) + return nil + } + log.Printf("INFO: Generating Markdown for %q", cmd.CommandPath()) mdFile := mdFilename(cmd) sourcePath := filepath.Join(c.source, mdFile) @@ -208,6 +214,9 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) { b.WriteString("### Subcommands\n\n") table := newMdTable("Name", "Description") for _, c := range cmd.Commands() { + if c.Hidden { + continue + } table.AddRow(fmt.Sprintf("[`%s`](%s)", c.Name(), mdFilename(c)), c.Short) } b.WriteString(table.String() + "\n") diff --git a/vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go b/vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go index f6ae6b853bf..523524297af 100644 --- a/vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go +++ b/vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go @@ -62,6 +62,7 @@ type cmdDoc struct { InheritedOptions []cmdOption `yaml:"inherited_options,omitempty"` Example string `yaml:"examples,omitempty"` Deprecated bool + Hidden bool MinAPIVersion string `yaml:"min_api_version,omitempty"` Experimental bool ExperimentalCLI bool @@ -155,6 +156,7 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error { Long: forceMultiLine(cmd.Long, longMaxWidth), Example: cmd.Example, Deprecated: len(cmd.Deprecated) > 0, + Hidden: cmd.Hidden, } if len(cliDoc.Long) == 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index 6bbe9b2ab07..ebdcea434f2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -234,7 +234,7 @@ github.com/docker/cli/cli/streams github.com/docker/cli/cli/trust github.com/docker/cli/cli/version github.com/docker/cli/opts -# github.com/docker/cli-docs-tool v0.5.1 +# github.com/docker/cli-docs-tool v0.6.0 ## explicit; go 1.18 github.com/docker/cli-docs-tool github.com/docker/cli-docs-tool/annotation