2016-10-14 18:30:36 -04:00
---
title: "version"
description: "The version command description and usage"
2016-11-03 18:48:30 -04:00
keywords: "version, architecture, api"
2016-10-14 18:30:36 -04:00
---
2015-06-21 16:41:38 -04:00
2017-10-04 13:03:55 -04:00
<!-- This file is maintained within the docker/cli GitHub
2017-07-28 13:28:23 -04:00
repository at https://github.com/docker/cli/. Make all
2016-10-19 13:25:45 -04:00
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
2015-06-21 16:41:38 -04:00
# version
2016-07-07 14:43:18 -04:00
```markdown
Usage: docker version [OPTIONS]
2015-06-21 16:41:38 -04:00
2016-07-07 14:43:18 -04:00
Show the Docker version information
2015-06-21 16:41:38 -04:00
2016-07-07 14:43:18 -04:00
Options:
2018-06-22 02:16:27 -04:00
-f, --format string Format the output using the given Go template
--help Print usage
2018-06-22 02:33:55 -04:00
--kubeconfig string Kubernetes config file
2016-07-07 14:43:18 -04:00
```
2015-06-25 21:25:41 -04:00
2017-02-07 18:42:48 -05:00
## Description
2015-06-25 21:25:41 -04:00
By default, this will render all version information in an easy to read
layout. If a format is specified, the given template will be executed instead.
Go's [text/template ](http://golang.org/pkg/text/template/ ) package
describes all the details of the format.
## Examples
2017-02-07 18:42:48 -05:00
### Default output
```bash
$ docker version
Client:
Version: 1.8.0
API version: 1.20
Go version: go1.4.2
Git commit: f5bae0a
Built: Tue Jun 23 17:56:00 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.0
API version: 1.20
Go version: go1.4.2
Git commit: f5bae0a
Built: Tue Jun 23 17:56:00 UTC 2015
OS/Arch: linux/amd64
```
### Get the server version
```bash
$ docker version --format '{{.Server.Version}}'
1.8.0
```
### Dump raw JSON data
```bash
$ docker version --format '{{json .}}'
{"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"}}
```