mirror of https://github.com/docker/cli.git
Merge pull request #3471 from thaJeztah/no_search_limit
search: remove client-side default for --limit
This commit is contained in:
commit
68cad50f61
|
@ -26,7 +26,7 @@ func NewSearchCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
cmd := &cobra.Command{
|
||||
Use: "search [OPTIONS] TERM",
|
||||
Short: "Search the Docker Hub for images",
|
||||
Short: "Search Docker Hub for images",
|
||||
Args: cli.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
options.term = args[0]
|
||||
|
@ -38,8 +38,7 @@ func NewSearchCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags.BoolVar(&options.noTrunc, "no-trunc", false, "Don't truncate output")
|
||||
flags.VarP(&options.filter, "filter", "f", "Filter output based on conditions provided")
|
||||
// TODO(thaJeztah) remove default from client as the daemon already has a default
|
||||
flags.IntVar(&options.limit, "limit", 25, "Max number of search results")
|
||||
flags.IntVar(&options.limit, "limit", 0, "Max number of search results")
|
||||
flags.StringVar(&options.format, "format", "", "Pretty-print search using a Go template")
|
||||
|
||||
return cmd
|
||||
|
|
|
@ -21,7 +21,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Docker management commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:----------------------|:-----------------------------------------------------|
|
||||
| [dockerd](dockerd.md) | Launch the Docker daemon |
|
||||
| [info](info.md) | Display system-wide information |
|
||||
| [inspect](inspect.md) | Return low-level information on a container or image |
|
||||
|
@ -31,7 +31,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Image commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:------------------------------|:----------------------------------------------------------------|
|
||||
| [build](build.md) | Build an image from a Dockerfile |
|
||||
| [commit](commit.md) | Create a new image from a container's changes |
|
||||
| [history](history.md) | Show the history of an image |
|
||||
|
@ -46,7 +46,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Container commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:--------------------------------------|:-----------------------------------------------------------------|
|
||||
| [attach](attach.md) | Attach to a running container |
|
||||
| [container prune](container_prune.md) | Remove all stopped containers |
|
||||
| [cp](cp.md) | Copy files/folders from a container to a HOSTDIR or to STDOUT |
|
||||
|
@ -75,17 +75,17 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Hub and registry commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:--------------------|:------------------------------------------------------------------------|
|
||||
| [login](login.md) | Register or log in to a Docker registry |
|
||||
| [logout](logout.md) | Log out from a Docker registry |
|
||||
| [pull](pull.md) | Pull an image or a repository from a Docker registry |
|
||||
| [push](push.md) | Push an image or a repository to a Docker registry |
|
||||
| [search](search.md) | Search the Docker Hub for images |
|
||||
| [search](search.md) | Search Docker Hub for images |
|
||||
|
||||
### Network and connectivity commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:--------------------------------------------|:-------------------------------------------------------|
|
||||
| [network connect](network_connect.md) | Connect a container to a network |
|
||||
| [network create](network_create.md) | Create a new network |
|
||||
| [network disconnect](network_disconnect.md) | Disconnect a container from a network |
|
||||
|
@ -97,7 +97,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Shared data volume commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:------------------------------------|:-----------------------------------------------------------------|
|
||||
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
|
||||
| [volume inspect](volume_inspect.md) | Display information about a volume |
|
||||
| [volume ls](volume_ls.md) | Lists all the volumes Docker knows about |
|
||||
|
@ -107,7 +107,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Swarm node commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:--------------------------------|:--------------------------------------------------------------|
|
||||
| [node demote](node_demote.md) | Demotes an existing manager so that it is no longer a manager |
|
||||
| [node inspect](node_inspect.md) | Inspect a node in the swarm |
|
||||
| [node ls](node_ls.md) | List nodes in the swarm |
|
||||
|
@ -119,7 +119,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Swarm management commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:----------------------------------------|:----------------------------------------------|
|
||||
| [swarm init](swarm_init.md) | Initialize a swarm |
|
||||
| [swarm join](swarm_join.md) | Join a swarm as a manager node or worker node |
|
||||
| [swarm leave](swarm_leave.md) | Remove the current node from the swarm |
|
||||
|
@ -131,7 +131,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Swarm service commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:--------------------------------------|:----------------------------------------------------------------|
|
||||
| [service create](service_create.md) | Create a new service |
|
||||
| [service inspect](service_inspect.md) | Inspect a service |
|
||||
| [service logs](service_logs.md) | Fetch the logs of a service or task |
|
||||
|
@ -144,7 +144,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Swarm secret commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:-------------------------------------|:------------------------------------------------|
|
||||
| [secret create](secret_create.md) | Create a secret from a file or STDIN as content |
|
||||
| [secret inspect](service_inspect.md) | Inspect the specified secret |
|
||||
| [secret ls](secret_ls.md) | List secrets in the swarm |
|
||||
|
@ -153,7 +153,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Swarm stack commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:------------------------------------|:-----------------------------------------------|
|
||||
| [stack deploy](stack_deploy.md) | Deploy a new stack or update an existing stack |
|
||||
| [stack ls](stack_ls.md) | List stacks in the swarm |
|
||||
| [stack ps](stack_ps.md) | List the tasks in the stack |
|
||||
|
@ -163,7 +163,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
### Plugin commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:------------------------------------|:------------------------------------------------|
|
||||
| [plugin create](plugin_create.md) | Create a plugin from a rootfs and configuration |
|
||||
| [plugin disable](plugin_disable.md) | Disable a plugin |
|
||||
| [plugin enable](plugin_enable.md) | Enable a plugin |
|
||||
|
@ -175,8 +175,9 @@ read the [`dockerd`](dockerd.md) reference page.
|
|||
| [plugin set](plugin_set.md) | Change settings for a plugin |
|
||||
|
||||
### Context commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------|:-------------------------------------------------------------------|
|
||||
|:--------------------------------------|:-------------------------------|
|
||||
| [context create](context_create.md) | Create a context |
|
||||
| [context export](context_export.md) | Export a context |
|
||||
| [context import](context_import.md) | Import a context |
|
||||
|
|
|
@ -9,7 +9,7 @@ keywords: "search, hub, images"
|
|||
```markdown
|
||||
Usage: docker search [OPTIONS] TERM
|
||||
|
||||
Search the Docker Hub for images
|
||||
Search Docker Hub for images
|
||||
|
||||
Options:
|
||||
-f, --filter value Filter output based on conditions provided (default [])
|
||||
|
@ -18,7 +18,7 @@ Options:
|
|||
- stars=<number> - image has at least 'number' stars
|
||||
--format string Pretty-print images using a Go template
|
||||
--help Print usage
|
||||
--limit int Max number of search results (default 25)
|
||||
--limit int Max number of search results
|
||||
--no-trunc Don't truncate output
|
||||
```
|
||||
|
||||
|
@ -79,8 +79,8 @@ radial/busyboxplus Full-chain, Internet enabled, busybox made from scratch. Co
|
|||
|
||||
### Limit search results (--limit)
|
||||
|
||||
The flag `--limit` is the maximum number of results returned by a search. This value could
|
||||
be in the range between 1 and 100. The default value of `--limit` is 25.
|
||||
The flag `--limit` is the maximum number of results returned by a search. If no
|
||||
value is set, the default is set by the daemon.
|
||||
|
||||
### Filtering
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ Search Docker Hub for images that match the specified `TERM`. The table
|
|||
of images returned displays the name, description (truncated by default), number
|
||||
of stars awarded, whether the image is official, and whether it is automated.
|
||||
|
||||
*Note* - Search queries will only return up to 25 results
|
||||
|
||||
## Filter
|
||||
|
||||
Filter output based on these conditions:
|
||||
|
|
Loading…
Reference in New Issue