2015-06-21 16:41:38 -04:00
# info
2023-01-06 13:04:05 -05:00
<!-- - MARKER_GEN_START -->
2016-07-07 14:43:18 -04:00
Display system-wide information
2015-10-03 11:56:41 -04:00
2023-01-06 13:04:05 -05:00
### Aliases
`docker system info` , `docker info`
### Options
2023-04-09 07:11:19 -04:00
| Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f` ](#format ), [`--format` ](#format ) | `string` | | Format output using a custom template:< br > 'json': Print in JSON format< br > 'TEMPLATE': Print output using the given Go template.< br > Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
2023-01-06 13:04:05 -05:00
cli: use custom annotation for aliases
Cobra allows for aliases to be defined for a command, but only allows these
to be defined at the same level (for example, `docker image ls` as alias for
`docker image list`). Our CLI has some commands that are available both as a
top-level shorthand as well as `docker <object> <verb>` subcommands. For example,
`docker ps` is a shorthand for `docker container ps` / `docker container ls`.
This patch introduces a custom "aliases" annotation that can be used to print
all available aliases for a command. While this requires these aliases to be
defined manually, in practice the list of aliases rarely changes, so maintenance
should be minimal.
As a convention, we could consider the first command in this list to be the
canonical command, so that we can use this information to add redirects in
our documentation in future.
Before this patch:
docker images --help
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
List images
Options:
-a, --all Show all images (default hides intermediate images)
...
With this patch:
docker images --help
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
List images
Aliases:
docker image ls, docker image list, docker images
Options:
-a, --all Show all images (default hides intermediate images)
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-28 04:52:25 -04:00
2023-01-06 13:04:05 -05:00
<!-- - MARKER_GEN_END -->
2016-03-14 00:53:30 -04:00
2017-02-07 18:42:48 -05:00
## Description
2016-03-14 00:53:30 -04:00
This command displays system wide information regarding the Docker installation.
Information displayed includes the kernel version, number of containers and images.
The number of images shown is the number of unique images. The same image tagged
under different names is counted only once.
2016-06-21 05:15:17 -04:00
If a format is specified, the given template will be executed instead of the
2023-08-25 08:10:40 -04:00
default format. Go's [text/template ](https://pkg.go.dev/text/template ) package
2016-06-21 05:15:17 -04:00
describes all the details of the format.
2016-03-14 00:53:30 -04:00
Depending on the storage driver in use, additional information can be shown, such
as pool name, data file, metadata file, data space used, total data space, metadata
space used, and total metadata space.
The data file is where the images are stored and the metadata file is where the
meta data regarding those images are stored. When run for the first time Docker
allocates a certain amount of data space and meta data space from the space
available on the volume where `/var/lib/docker` is mounted.
2017-02-07 18:42:48 -05:00
## Examples
### Show output
2022-06-06 09:22:32 -04:00
The example below shows the output for a daemon running on Ubuntu Linux,
using the `overlay2` storage driver. As can be seen in the output, additional
information about the `overlay2` storage driver is shown:
2017-02-07 18:42:48 -05:00
2021-08-21 08:54:14 -04:00
```console
2017-02-07 18:42:48 -05:00
$ docker info
2021-08-21 08:54:14 -04:00
2023-04-10 09:25:31 -04:00
Client: Docker Engine - Community
Version: 24.0.0
2020-05-07 07:28:37 -04:00
Context: default
2019-01-25 08:10:59 -05:00
Debug Mode: false
Plugins:
2022-06-06 09:22:32 -04:00
buildx: Docker Buildx (Docker Inc.)
2023-04-10 08:14:29 -04:00
Version: v0.10.4
2022-06-06 09:22:32 -04:00
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
2023-04-10 08:14:29 -04:00
Version: v2.17.2
2022-06-06 09:22:32 -04:00
Path: /usr/libexec/docker/cli-plugins/docker-compose
2019-01-25 08:10:59 -05:00
Server:
Containers: 14
Running: 3
Paused: 1
Stopped: 10
Images: 52
2023-04-10 08:14:29 -04:00
Server Version: 23.0.3
2019-01-25 08:10:59 -05:00
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
2022-06-06 09:22:32 -04:00
Using metacopy: false
Native Overlay Diff: true
userxattr: false
2019-01-25 08:10:59 -05:00
Logging Driver: json-file
2022-06-06 09:22:32 -04:00
Cgroup Driver: systemd
Cgroup Version: 2
2019-01-25 08:10:59 -05:00
Plugins:
Volume: local
2022-06-06 09:22:32 -04:00
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
2023-08-22 08:05:07 -04:00
CDI spec directories:
/etc/cdi
/var/run/cdi
2022-06-06 09:22:32 -04:00
Swarm: inactive
2023-04-10 08:14:29 -04:00
Runtimes: io.containerd.runc.v2 runc
2019-01-25 08:10:59 -05:00
Default Runtime: runc
Init Binary: docker-init
2023-04-10 08:14:29 -04:00
containerd version: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc version: v1.1.5-0-gf19387a
2022-06-06 09:22:32 -04:00
init version: de40ad0
2019-01-25 08:10:59 -05:00
Security Options:
apparmor
seccomp
2022-06-06 09:22:32 -04:00
Profile: builtin
cgroupns
Kernel Version: 5.15.0-25-generic
Operating System: Ubuntu 22.04 LTS
2019-01-25 08:10:59 -05:00
OSType: linux
Architecture: x86_64
2022-06-06 09:22:32 -04:00
CPUs: 1
Total Memory: 991.7 MiB
Name: ip-172-30-0-91.ec2.internal
ID: 4cee4408-10d2-4e17-891c-a41736ac4536
2019-01-25 08:10:59 -05:00
Docker Root Dir: /var/lib/docker
2022-06-06 09:22:32 -04:00
Debug Mode: false
Username: gordontheturtle
2019-01-25 08:10:59 -05:00
Experimental: false
2023-04-10 08:14:29 -04:00
Insecure Registries:
2022-06-06 09:22:32 -04:00
myinsecurehost:5000
2019-01-25 08:10:59 -05:00
127.0.0.0/8
Live Restore Enabled: false
2017-02-07 18:42:48 -05:00
```
2023-01-06 13:28:29 -05:00
### <a name="format"></a> Format the output (--format)
2016-06-21 05:15:17 -04:00
You can also specify the output format:
2021-08-21 08:54:14 -04:00
```console
2017-02-07 18:42:48 -05:00
$ docker info --format '{{json .}}'
2023-04-10 08:14:29 -04:00
{"ID":"4cee4408-10d2-4e17-891c-a41736ac4536","Containers":14, ...}
2017-02-07 18:42:48 -05:00
```
### Run `docker info` on Windows
2016-09-07 18:10:00 -04:00
2022-06-06 09:22:32 -04:00
Here is a sample output for a daemon running on Windows Server:
2016-09-07 18:10:00 -04:00
2020-05-11 11:32:52 -04:00
```console
2022-06-06 09:22:32 -04:00
C:\> docker info
2023-04-10 09:25:31 -04:00
Client: Docker Engine - Community
Version: 24.0.0
2020-05-07 07:28:37 -04:00
Context: default
2019-01-25 08:10:59 -05:00
Debug Mode: false
2022-06-06 09:22:32 -04:00
Plugins:
2023-04-10 08:14:29 -04:00
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.4
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
2019-01-25 08:10:59 -05:00
Server:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 17
2023-04-10 08:14:29 -04:00
Server Version: 23.0.3
2019-01-25 08:10:59 -05:00
Storage Driver: windowsfilter
Logging Driver: json-file
Plugins:
Volume: local
2022-06-06 09:22:32 -04:00
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
2019-01-25 08:10:59 -05:00
Swarm: inactive
Default Isolation: process
2022-06-06 09:22:32 -04:00
Kernel Version: 10.0 20348 (20348.1.amd64fre.fe_release.210507-1500)
Operating System: Microsoft Windows Server Version 21H2 (OS Build 20348.707)
2019-01-25 08:10:59 -05:00
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 3.999 GiB
Name: WIN-V0V70C0LU5P
2022-06-06 09:22:32 -04:00
ID: 2880d38d-464e-4d01-91bd-c76f33ba3981
Docker Root Dir: C:\ProgramData\docker
2019-01-25 08:10:59 -05:00
Debug Mode: false
2022-06-06 09:22:32 -04:00
Experimental: true
2019-01-25 08:10:59 -05:00
Insecure Registries:
2022-06-06 09:22:32 -04:00
myregistry:5000
2019-01-25 08:10:59 -05:00
127.0.0.0/8
Registry Mirrors:
http://192.168.1.2/
http://registry-mirror.example.com:5000/
Live Restore Enabled: false
2017-02-07 18:42:48 -05:00
```