Merge pull request #4179 from thaJeztah/no_2206

docs: update engine versions in some examples
This commit is contained in:
Sebastiaan van Stijn 2023-04-10 18:42:09 +02:00 committed by GitHub
commit fff5a31a5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 91 deletions

View File

@ -661,7 +661,7 @@ The `--squash` option has a number of known limitations:
#### Prerequisites #### Prerequisites
The example on this page is using experimental mode in Docker 19.03. The example on this page is using experimental mode in Docker 23.03.
Experimental mode can be enabled by using the `--experimental` flag when starting Experimental mode can be enabled by using the `--experimental` flag when starting
the Docker daemon or setting `experimental: true` in the `daemon.json` configuration the Docker daemon or setting `experimental: true` in the `daemon.json` configuration
@ -673,21 +673,21 @@ line in the `Engine` section:
```console ```console
Client: Docker Engine - Community Client: Docker Engine - Community
Version: 19.03.8 Version: 23.0.3
API version: 1.40 API version: 1.42
Go version: go1.12.17 Go version: go1.19.7
Git commit: afacb8b Git commit: 3e7cbfd
Built: Wed Mar 11 01:21:11 2020 Built: Tue Apr 4 22:05:41 2023
OS/Arch: darwin/amd64 OS/Arch: darwin/amd64
Experimental: false Context: default
Server: Docker Engine - Community Server: Docker Engine - Community
Engine: Engine:
Version: 19.03.8 Version: 23.0.3
API version: 1.40 (minimum version 1.12) API version: 1.42 (minimum version 1.12)
Go version: go1.12.17 Go version: go1.19.7
Git commit: afacb8b Git commit: 59118bf
Built: Wed Mar 11 01:29:16 2020 Built: Tue Apr 4 22:05:41 2023
OS/Arch: linux/amd64 OS/Arch: linux/amd64
Experimental: true Experimental: true
[...] [...]

View File

@ -52,14 +52,11 @@ Client:
Debug Mode: false Debug Mode: false
Plugins: Plugins:
buildx: Docker Buildx (Docker Inc.) buildx: Docker Buildx (Docker Inc.)
Version: v0.8.2 Version: v0.10.4
Path: /usr/libexec/docker/cli-plugins/docker-buildx Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.) compose: Docker Compose (Docker Inc.)
Version: v2.6.0 Version: v2.17.2
Path: /usr/libexec/docker/cli-plugins/docker-compose Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.17.0
Path: /usr/libexec/docker/cli-plugins/docker-scan
Server: Server:
Containers: 14 Containers: 14
@ -67,7 +64,7 @@ Server:
Paused: 1 Paused: 1
Stopped: 10 Stopped: 10
Images: 52 Images: 52
Server Version: 22.06.0 Server Version: 23.0.3
Storage Driver: overlay2 Storage Driver: overlay2
Backing Filesystem: extfs Backing Filesystem: extfs
Supports d_type: true Supports d_type: true
@ -82,11 +79,11 @@ Server:
Network: bridge host ipvlan macvlan null overlay Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc Default Runtime: runc
Init Binary: docker-init Init Binary: docker-init
containerd version: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16 containerd version: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc version: v1.1.1-0-g52de29d runc version: v1.1.5-0-gf19387a
init version: de40ad0 init version: de40ad0
Security Options: Security Options:
apparmor apparmor
@ -106,7 +103,7 @@ Server:
Username: gordontheturtle Username: gordontheturtle
Registry: https://index.docker.io/v1/ Registry: https://index.docker.io/v1/
Experimental: false Experimental: false
Insecure registries: Insecure Registries:
myinsecurehost:5000 myinsecurehost:5000
127.0.0.0/8 127.0.0.0/8
Live Restore Enabled: false Live Restore Enabled: false
@ -119,7 +116,7 @@ You can also specify the output format:
```console ```console
$ docker info --format '{{json .}}' $ docker info --format '{{json .}}'
{"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...} {"ID":"4cee4408-10d2-4e17-891c-a41736ac4536","Containers":14, ...}
``` ```
### Run `docker info` on Windows ### Run `docker info` on Windows
@ -133,9 +130,12 @@ Client:
Context: default Context: default
Debug Mode: false Debug Mode: false
Plugins: Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2-docker) buildx: Docker Buildx (Docker Inc.)
compose: Docker Compose (Docker Inc., v2.6.0) Version: v0.10.4
scan: Docker Scan (Docker Inc., v0.17.0) Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.17.2
Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe
Server: Server:
Containers: 1 Containers: 1
@ -143,7 +143,7 @@ Server:
Paused: 0 Paused: 0
Stopped: 1 Stopped: 1
Images: 17 Images: 17
Server Version: 20.10.16 Server Version: 23.0.3
Storage Driver: windowsfilter Storage Driver: windowsfilter
Logging Driver: json-file Logging Driver: json-file
Plugins: Plugins:

View File

@ -110,10 +110,10 @@ Show all nodes that have a `region` node label set:
$ docker node ls --filter node.label=region $ docker node ls --filter node.label=region
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
yg550ettvsjn6g6t840iaiwgb * swarm-test-01 Ready Active Leader 20.10.2 yg550ettvsjn6g6t840iaiwgb * swarm-test-01 Ready Active Leader 23.0.3
2lm9w9kbepgvkzkkeyku40e65 swarm-test-02 Ready Active Reachable 20.10.2 2lm9w9kbepgvkzkkeyku40e65 swarm-test-02 Ready Active Reachable 23.0.3
hc0pu7ntc7s4uvj4pv7z7pz15 swarm-test-03 Ready Active Reachable 20.10.2 hc0pu7ntc7s4uvj4pv7z7pz15 swarm-test-03 Ready Active Reachable 23.0.3
n41b2cijmhifxxvz56vwrs12q swarm-test-04 Ready Active 20.10.2 n41b2cijmhifxxvz56vwrs12q swarm-test-04 Ready Active 23.0.3
``` ```
Show all nodes that have a `region` node label, with value `region-a`: Show all nodes that have a `region` node label, with value `region-a`:
@ -122,8 +122,8 @@ Show all nodes that have a `region` node label, with value `region-a`:
$ docker node ls --filter node.label=region=region-a $ docker node ls --filter node.label=region=region-a
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
yg550ettvsjn6g6t840iaiwgb * swarm-test-01 Ready Active Leader 20.10.2 yg550ettvsjn6g6t840iaiwgb * swarm-test-01 Ready Active Leader 23.0.3
2lm9w9kbepgvkzkkeyku40e65 swarm-test-02 Ready Active Reachable 20.10.2 2lm9w9kbepgvkzkkeyku40e65 swarm-test-02 Ready Active Reachable 23.0.3
``` ```
#### membership #### membership
@ -203,7 +203,7 @@ e216jshn25ckzbvmwlnh5jr3g: swarm-manager1 Ready
To list all nodes in JSON format, use the `json` directive: To list all nodes in JSON format, use the `json` directive:
```console ```console
$ docker node ls --format json $ docker node ls --format json
{"Availability":"Active","EngineVersion":"20.10.5","Hostname":"docker-desktop","ID":"k8f4w7qtzpj5sqzclcqafw35g","ManagerStatus":"Leader","Self":true,"Status":"Ready","TLSStatus":"Ready"} {"Availability":"Active","EngineVersion":"23.0.3","Hostname":"docker-desktop","ID":"k8f4w7qtzpj5sqzclcqafw35g","ManagerStatus":"Leader","Self":true,"Status":"Ready","TLSStatus":"Ready"}
``` ```
## Related commands ## Related commands

View File

@ -37,30 +37,30 @@ machine running Docker Desktop:
```console ```console
$ docker version $ docker version
Client: Client: Docker Engine - Community
Version: 20.10.16 Version: 23.0.3
API version: 1.41 API version: 1.42
Go version: go1.17.10 Go version: go1.19.7
Git commit: aa7e414 Git commit: 3e7cbfd
Built: Thu May 12 09:17:28 2022 Built: Tue Apr 4 22:05:41 2023
OS/Arch: darwin/amd64 OS/Arch: darwin/amd64
Context: default Context: default
Server: Docker Desktop 4.8.2 (77141) Server: Docker Desktop 4.19.0 (12345)
Engine: Engine:
Version: 20.10.16 Version: 23.0.3
API version: 1.41 (minimum version 1.12) API version: 1.42 (minimum version 1.12)
Go version: go1.17.10 Go version: go1.19.7
Git commit: f756502 Git commit: 59118bf
Built: Thu May 12 09:15:33 2022 Built: Tue Apr 4 22:05:41 2023
OS/Arch: linux/amd64 OS/Arch: linux/amd64
Experimental: false Experimental: false
containerd: containerd:
Version: 1.6.4 Version: 1.6.20
GitCommit: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16 GitCommit: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc: runc:
Version: 1.1.1 Version: 1.1.5
GitCommit: v1.1.1-0-g52de29d GitCommit: v1.1.5-0-gf19387a
docker-init: docker-init:
Version: 0.19.0 Version: 0.19.0
GitCommit: de40ad0 GitCommit: de40ad0
@ -82,12 +82,12 @@ remote-test-server
$ docker version $ docker version
Client: Client: Docker Engine - Community
Version: 20.10.16 Version: 23.0.3
API version: 1.40 (downgraded from 1.41) API version: 1.40 (downgraded from 1.42)
Go version: go1.17.10 Go version: go1.19.7
Git commit: aa7e414 Git commit: 3e7cbfd
Built: Thu May 12 09:17:28 2022 Built: Tue Apr 4 22:05:41 2023
OS/Arch: darwin/amd64 OS/Arch: darwin/amd64
Context: remote-test-server Context: remote-test-server
@ -142,7 +142,7 @@ $ docker version --format '{{.Client.APIVersion}}'
$ unset DOCKER_API_VERSION $ unset DOCKER_API_VERSION
$ docker version --format '{{.Client.APIVersion}}' $ docker version --format '{{.Client.APIVersion}}'
1.41 1.42
``` ```
## Examples ## Examples
@ -159,7 +159,7 @@ page for details of the format.
```console ```console
$ docker version --format '{{.Server.Version}}' $ docker version --format '{{.Server.Version}}'
20.10.16 23.0.3
``` ```
### Get the client API version ### Get the client API version
@ -169,7 +169,7 @@ The following example prints the API version that is used by the client:
```console ```console
$ docker version --format '{{.Client.APIVersion}}' $ docker version --format '{{.Client.APIVersion}}'
1.41 1.42
``` ```
The version shown is the API version that is negotiated between the client The version shown is the API version that is negotiated between the client
@ -181,5 +181,5 @@ above for more information.
```console ```console
$ docker version --format '{{json .}}' $ docker version --format '{{json .}}'
{"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"}} {"Client":"Version":"23.0.3","ApiVersion":"1.42", ...}
``` ```

View File

@ -32,14 +32,11 @@ Client:
Debug Mode: false Debug Mode: false
Plugins: Plugins:
buildx: Docker Buildx (Docker Inc.) buildx: Docker Buildx (Docker Inc.)
Version: v0.8.2 Version: v0.10.4
Path: /usr/libexec/docker/cli-plugins/docker-buildx Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.) compose: Docker Compose (Docker Inc.)
Version: v2.6.0 Version: v2.17.2
Path: /usr/libexec/docker/cli-plugins/docker-compose Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.17.0
Path: /usr/libexec/docker/cli-plugins/docker-scan
Server: Server:
Containers: 14 Containers: 14
@ -47,7 +44,7 @@ Server:
Paused: 1 Paused: 1
Stopped: 10 Stopped: 10
Images: 52 Images: 52
Server Version: 22.06.0 Server Version: 23.0.3
Storage Driver: overlay2 Storage Driver: overlay2
Backing Filesystem: extfs Backing Filesystem: extfs
Supports d_type: true Supports d_type: true
@ -62,11 +59,11 @@ Server:
Network: bridge host ipvlan macvlan null overlay Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc Default Runtime: runc
Init Binary: docker-init Init Binary: docker-init
containerd version: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16 containerd version: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc version: v1.1.1-0-g52de29d runc version: v1.1.5-0-gf19387a
init version: de40ad0 init version: de40ad0
Security Options: Security Options:
apparmor apparmor
@ -86,7 +83,7 @@ Server:
Username: gordontheturtle Username: gordontheturtle
Registry: https://index.docker.io/v1/ Registry: https://index.docker.io/v1/
Experimental: false Experimental: false
Insecure registries: Insecure Registries:
myinsecurehost:5000 myinsecurehost:5000
127.0.0.0/8 127.0.0.0/8
Live Restore Enabled: false Live Restore Enabled: false
@ -95,4 +92,4 @@ Server:
You can also specify the output format: You can also specify the output format:
$ docker info --format '{{json .}}' $ docker info --format '{{json .}}'
{"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...} {"ID":"4cee4408-10d2-4e17-891c-a41736ac4536","Containers":14, ...}

View File

@ -1,37 +1,57 @@
This command displays version information for both the Docker client and The version command prints the current version number for all independently
daemon. versioned Docker components.
# EXAMPLES # EXAMPLES
## Display Docker version information ## Display Docker version information
The default output: The default output renders all version information divided into two sections;
the "Client" section contains information about the Docker CLI and client
components, and the "Server" section contains information about the Docker
Engine and components used by the Engine, such as the "Containerd" and "Runc"
OCI Runtimes.
The information shown may differ depending on how you installed Docker and
what components are in use. The following example shows the output on a macOS
machine running Docker Desktop:
$ docker version $ docker version
Client: Client: Docker Engine - Community
Version: 1.8.0 Version: 23.0.3
API version: 1.20 API version: 1.42
Go version: go1.4.2 Go version: go1.19.7
Git commit: f5bae0a Git commit: 3e7cbfd
Built: Tue Jun 23 17:56:00 UTC 2015 Built: Tue Apr 4 22:05:41 2023
OS/Arch: linux/amd64 OS/Arch: darwin/amd64
Context: default
Server:
Version: 1.8.0 Server: Docker Desktop 4.19.0 (12345)
API version: 1.20 Engine:
Go version: go1.4.2 Version: 23.0.3
Git commit: f5bae0a API version: 1.42 (minimum version 1.12)
Built: Tue Jun 23 17:56:00 UTC 2015 Go version: go1.19.7
OS/Arch: linux/amd64 Git commit: 59118bf
Built: Tue Apr 4 22:05:41 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.20
GitCommit: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc:
Version: 1.1.5
GitCommit: v1.1.5-0-gf19387a
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Get server version: Get server version:
$ docker version --format '{{.Server.Version}}' $ docker version --format '{{.Server.Version}}'
1.8.0 23.0.3
Dump raw data: Dump raw data:
To view all available fields, you can use the format `{{json .}}`. To view all available fields, you can use the format `{{json .}}`.
$ docker version --format '{{json .}}' $ 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"}} {"Client":"Version":"23.0.3","ApiVersion":"1.42", ...}