github.com/olljanat/moby@v1.13.1/docs/reference/commandline/version.md (about)

     1  ---
     2  title: "version"
     3  description: "The version command description and usage"
     4  keywords: "version, architecture, api"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/docker Github
     8       repository at https://github.com/docker/docker/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # version
    17  
    18  ```markdown
    19  Usage:  docker version [OPTIONS]
    20  
    21  Show the Docker version information
    22  
    23  Options:
    24    -f, --format string   Format the output using the given Go template
    25        --help            Print usage
    26  ```
    27  
    28  By default, this will render all version information in an easy to read
    29  layout. If a format is specified, the given template will be executed instead.
    30  
    31  Go's [text/template](http://golang.org/pkg/text/template/) package
    32  describes all the details of the format.
    33  
    34  ## Examples
    35  
    36  **Default output:**
    37  
    38      $ docker version
    39  	Client:
    40  	 Version:      1.8.0
    41  	 API version:  1.20
    42  	 Go version:   go1.4.2
    43  	 Git commit:   f5bae0a
    44  	 Built:        Tue Jun 23 17:56:00 UTC 2015
    45  	 OS/Arch:      linux/amd64
    46  
    47  	Server:
    48  	 Version:      1.8.0
    49  	 API version:  1.20
    50  	 Go version:   go1.4.2
    51  	 Git commit:   f5bae0a
    52  	 Built:        Tue Jun 23 17:56:00 UTC 2015
    53  	 OS/Arch:      linux/amd64
    54  
    55  **Get server version:**
    56  
    57      {% raw %}
    58      $ docker version --format '{{.Server.Version}}'
    59  	1.8.0
    60      {% endraw %}
    61  
    62  **Dump raw data:**
    63  
    64      {% raw %}
    65      $ docker version --format '{{json .}}'
    66      {"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}}
    67      {% endraw %}