github.com/slene/docker@v1.8.0-rc1/docs/reference/commandline/version.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "version"
     4  description = "The version command description and usage"
     5  keywords = ["version, architecture, api"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  weight=1
     9  +++
    10  <![end-metadata]-->
    11  
    12  # version
    13  
    14      Usage: docker version
    15  
    16      Show the Docker version information.
    17  
    18        -f, --format=""    Format the output using the given go template
    19  
    20  By default, this will render all version information in an easy to read
    21  layout. If a format is specified, the given template will be executed instead.
    22  
    23  Go's [text/template](http://golang.org/pkg/text/template/) package
    24  describes all the details of the format.
    25  
    26  ## Examples
    27  
    28  **Default output:**
    29  
    30      $ docker version
    31  	Client:
    32  	 Version:      1.8.0
    33  	 API version:  1.20
    34  	 Go version:   go1.4.2
    35  	 Git commit:   f5bae0a
    36  	 Built:        Tue Jun 23 17:56:00 UTC 2015
    37  	 OS/Arch:      linux/amd64
    38  
    39  	Server:
    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  **Get server version:**
    48  
    49      $ docker version --format '{{.Server.Version}}'
    50  	1.8.0
    51  
    52  **Dump raw data:**
    53  
    54      $ docker version --format '{{json .}}'
    55      {"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"}}
    56