mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
		
							parent
							
								
									beea4d93dc
								
							
						
					
					
						commit
						cc03984e17
					
				
					 3 changed files with 13 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -25,8 +25,11 @@ func NewInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
 | 
			
		|||
	var opts inspectOptions
 | 
			
		||||
 | 
			
		||||
	cmd := &cobra.Command{
 | 
			
		||||
		Use:   "inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...]",
 | 
			
		||||
		Short: "Return low-level information on a container, image or task",
 | 
			
		||||
		Use: "inspect [OPTIONS] NAME|ID [NAME|ID...]",
 | 
			
		||||
		Short: strings.Join([]string{
 | 
			
		||||
			"Return low-level information on Docker object(s) (e.g. container, image, volume,",
 | 
			
		||||
			"\nnetwork, node, service, or task) identified by name or ID",
 | 
			
		||||
		}, ""),
 | 
			
		||||
		Args: cli.RequiresMinArgs(1),
 | 
			
		||||
		RunE: func(cmd *cobra.Command, args []string) error {
 | 
			
		||||
			opts.ids = args
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ parent = "smn_cli"
 | 
			
		|||
```markdown
 | 
			
		||||
Usage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]
 | 
			
		||||
 | 
			
		||||
Return low-level information on one or multiple containers, images, volumes,
 | 
			
		||||
networks, nodes, services, or tasks identified by name or ID.
 | 
			
		||||
Return low-level information on Docker object(s) (e.g. container, image, volume,
 | 
			
		||||
network, node, service, or task) identified by name or ID
 | 
			
		||||
 | 
			
		||||
Options:
 | 
			
		||||
  -f, --format       Format the output using the given go template
 | 
			
		||||
      --help         Print usage
 | 
			
		||||
  -s, --size         Display total file sizes if the type is container
 | 
			
		||||
                     values are "image" or "container" or "task
 | 
			
		||||
      --type         Return JSON for specified type
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,8 +14,8 @@ NAME|ID [NAME|ID...]
 | 
			
		|||
 | 
			
		||||
# DESCRIPTION
 | 
			
		||||
 | 
			
		||||
This displays all the information available in Docker for one or multiple given
 | 
			
		||||
containers, images, volumes, networks, nodes, services, or tasks. By default,
 | 
			
		||||
This displays the low-level information on Docker object(s) (e.g. container, 
 | 
			
		||||
image, volume,network, node, service, or task) identified by name or ID. By default,
 | 
			
		||||
this will render all results in a JSON array. If the container and image have
 | 
			
		||||
the same name, this will return container JSON for unspecified type. If a format
 | 
			
		||||
is specified, the given template will be executed for each result.
 | 
			
		||||
| 
						 | 
				
			
			@ -25,14 +25,14 @@ is specified, the given template will be executed for each result.
 | 
			
		|||
    Print usage statement
 | 
			
		||||
 | 
			
		||||
**-f**, **--format**=""
 | 
			
		||||
    Format the output using the given Go template.
 | 
			
		||||
    Format the output using the given Go template
 | 
			
		||||
 | 
			
		||||
**-s**, **--size**
 | 
			
		||||
    Display total file sizes if the type is container.
 | 
			
		||||
    Display total file sizes if the type is container
 | 
			
		||||
 | 
			
		||||
**--type**=*container*|*image*|*network*|*node*|*service*|*task*|*volume*
 | 
			
		||||
    Return JSON for specified type, permissible values are "image", "container",
 | 
			
		||||
    "network", "node", "service", "task", and "volume".
 | 
			
		||||
    "network", "node", "service", "task", and "volume"
 | 
			
		||||
 | 
			
		||||
# EXAMPLES
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue