mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-21 21:30:48 +02:00
Fix formatting in docker version
This commit is contained in:
parent
d38b8f44b1
commit
f4a8ea2066
1 changed files with 14 additions and 7 deletions
21
README.md
21
README.md
|
@ -212,17 +212,24 @@ Images are just [templates for docker containers](https://docs.docker.com/engine
|
||||||
|
|
||||||
It is very important that you always know the current version of Docker you are currently running on at any point in time.This is very helpful because you get to know what features are compatible with what you have running. This is also important because you know what containers to run from the docker store when you are trying to get template containers. That said let see how to know what version of docker we have running currently
|
It is very important that you always know the current version of Docker you are currently running on at any point in time.This is very helpful because you get to know what features are compatible with what you have running. This is also important because you know what containers to run from the docker store when you are trying to get template containers. That said let see how to know what version of docker we have running currently
|
||||||
|
|
||||||
* ['docker version'](https://docs.docker.com/engine/reference/commandline/version/) check what version of docker you have running
|
* ['docker version'](https://docs.docker.com/engine/reference/commandline/version/) check what version of docker you have running
|
||||||
* [docker version [OPTIONS]]
|
|
||||||
|
|
||||||
Get the server version
|
```bash
|
||||||
$ docker version --format '{{.Server.Version}}'
|
# Get the server version
|
||||||
|
docker version --format '{{.Server.Version}}'
|
||||||
|
```
|
||||||
|
|
||||||
1.8.0
|
In Docker 1.8.0 and higher, you can also dump the raw JSON data:
|
||||||
Dump raw JSON data
|
|
||||||
$ docker version --format '{{json .}}'
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker version --format '{{json .}}'
|
||||||
|
```
|
||||||
|
|
||||||
|
will provide the output in JSON format:
|
||||||
|
|
||||||
|
```json
|
||||||
{"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"am"}
|
{"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"am"}
|
||||||
|
```
|
||||||
|
|
||||||
### Cleaning up
|
### Cleaning up
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue