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
|
|
|
|
|
|
|
# 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
|
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.
|
|
|
|
|
2021-10-14 18:04:36 -04:00
|
|
|
Go's [text/template](https://golang.org/pkg/text/template/) package
|
2015-06-25 21:25:41 -04:00
|
|
|
describes all the details of the format.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2017-02-07 18:42:48 -05:00
|
|
|
### Default output
|
|
|
|
|
2021-08-21 08:54:14 -04:00
|
|
|
```console
|
2017-02-07 18:42:48 -05:00
|
|
|
$ docker version
|
|
|
|
|
|
|
|
Client:
|
2020-04-19 09:43:08 -04:00
|
|
|
Version: 19.03.8
|
|
|
|
API version: 1.40
|
|
|
|
Go version: go1.12.17
|
|
|
|
Git commit: afacb8b
|
|
|
|
Built: Wed Mar 11 01:21:11 2020
|
|
|
|
OS/Arch: darwin/amd64
|
2020-05-07 06:57:20 -04:00
|
|
|
Context: default
|
2020-04-19 09:43:08 -04:00
|
|
|
Experimental: true
|
2017-02-07 18:42:48 -05:00
|
|
|
|
|
|
|
Server:
|
2020-04-19 09:43:08 -04:00
|
|
|
Engine:
|
|
|
|
Version: 19.03.8
|
|
|
|
API version: 1.40 (minimum version 1.12)
|
|
|
|
Go version: go1.12.17
|
|
|
|
Git commit: afacb8b
|
|
|
|
Built: Wed Mar 11 01:29:16 2020
|
|
|
|
OS/Arch: linux/amd64
|
|
|
|
Experimental: true
|
|
|
|
containerd:
|
|
|
|
Version: v1.2.13
|
|
|
|
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
|
|
|
|
runc:
|
|
|
|
Version: 1.0.0-rc10
|
|
|
|
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
|
|
|
|
docker-init:
|
|
|
|
Version: 0.18.0
|
|
|
|
GitCommit: fec3683
|
2017-02-07 18:42:48 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
### Get the server version
|
|
|
|
|
2021-08-21 08:54:14 -04:00
|
|
|
```console
|
2017-02-07 18:42:48 -05:00
|
|
|
$ docker version --format '{{.Server.Version}}'
|
|
|
|
|
2020-04-19 09:43:08 -04:00
|
|
|
19.03.8
|
2017-02-07 18:42:48 -05:00
|
|
|
```
|
|
|
|
|
2018-11-07 15:11:14 -05:00
|
|
|
### Get the client API version
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ docker version --format '{{.Client.APIVersion}}'
|
|
|
|
|
|
|
|
1.41
|
|
|
|
```
|
|
|
|
|
2017-02-07 18:42:48 -05:00
|
|
|
### Dump raw JSON data
|
|
|
|
|
2021-08-21 08:54:14 -04:00
|
|
|
```console
|
2017-02-07 18:42:48 -05:00
|
|
|
$ docker version --format '{{json .}}'
|
|
|
|
|
2020-04-19 09:43:08 -04:00
|
|
|
{"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"19.03.8","ApiVersion":"1.40","DefaultAPIVersion":"1.40","GitCommit":"afacb8b","GoVersion":"go1.12.17","Os":"darwin","Arch":"amd64","BuildTime":"Wed Mar 11 01:21:11 2020","Experimental":true},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"19.03.8","Details":{"ApiVersion":"1.40","Arch":"amd64","BuildTime":"Wed Mar 11 01:29:16 2020","Experimental":"true","GitCommit":"afacb8b","GoVersion":"go1.12.17","KernelVersion":"4.19.76-linuxkit","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"v1.2.13","Details":{"GitCommit":"7ad184331fa3e55e52b890ea95e65ba581ae3429"}},{"Name":"runc","Version":"1.0.0-rc10","Details":{"GitCommit":"dc9208a3303feef5b3839f4323d9beb36df0a9dd"}},{"Name":"docker-init","Version":"0.18.0","Details":{"GitCommit":"fec3683"}}],"Version":"19.03.8","ApiVersion":"1.40","MinAPIVersion":"1.12","GitCommit":"afacb8b","GoVersion":"go1.12.17","Os":"linux","Arch":"amd64","KernelVersion":"4.19.76-linuxkit","Experimental":true,"BuildTime":"2020-03-11T01:29:16.000000000+00:00"}}
|
2017-02-07 18:42:48 -05:00
|
|
|
```
|