github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/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  +++
     9  <![end-metadata]-->
    10  
    11  # version
    12  
    13  ```markdown
    14  Usage:  docker version [OPTIONS]
    15  
    16  Show the Docker version information
    17  
    18  Options:
    19    -f, --format string   Format the output using the given go template
    20        --help            Print usage
    21  ```
    22  
    23  By default, this will render all version information in an easy to read
    24  layout. If a format is specified, the given template will be executed instead.
    25  
    26  Go's [text/template](http://golang.org/pkg/text/template/) package
    27  describes all the details of the format.
    28  
    29  ## Examples
    30  
    31  **Default output:**
    32  
    33      $ docker version
    34  	Client:
    35  	 Version:      1.8.0
    36  	 API version:  1.20
    37  	 Go version:   go1.4.2
    38  	 Git commit:   f5bae0a
    39  	 Built:        Tue Jun 23 17:56:00 UTC 2015
    40  	 OS/Arch:      linux/amd64
    41  
    42  	Server:
    43  	 Version:      1.8.0
    44  	 API version:  1.20
    45  	 Go version:   go1.4.2
    46  	 Git commit:   f5bae0a
    47  	 Built:        Tue Jun 23 17:56:00 UTC 2015
    48  	 OS/Arch:      linux/amd64
    49  
    50  **Get server version:**
    51  
    52      $ docker version --format '{{.Server.Version}}'
    53  	1.8.0
    54  
    55  **Dump raw data:**
    56  
    57      $ docker version --format '{{json .}}'
    58      {"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"}}