github.com/sijibomii/docker@v0.0.0-20231230191044-5cf6ca554647/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 Usage: docker version [OPTIONS] 14 15 Show the Docker version information. 16 17 -f, --format="" Format the output using the given go template 18 --help Print usage 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"}}