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
2024-01-18 07:24:23 -05:00
Client:
Version: 25.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.)
2024-01-18 07:24:23 -05:00
Version: v0.12.1
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
2022-06-06 09:22:32 -04:00
compose: Docker Compose (Docker Inc.)
2024-01-18 07:24:23 -05:00
Version: v2.24.1
Path: /usr/local/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
2024-01-18 07:24:23 -05:00
Server Version: 25.0.0
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
2019-01-25 08:10:59 -05:00
Logging Driver: json-file
2024-01-18 07:24:23 -05:00
Cgroup Driver: cgroupfs
2022-06-06 09:22:32 -04:00
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
2023-12-13 07:16:31 -05:00
Log: awslogs fluentd gcplogs gelf journald json-file local 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
2024-01-18 07:24:23 -05:00
Runtimes: runc io.containerd.runc.v2
2019-01-25 08:10:59 -05:00
Default Runtime: runc
Init Binary: docker-init
2024-01-18 07:24:23 -05:00
containerd version: 71909c1814c544ac47ab91d2e8b84718e517bb99
runc version: v1.1.11-0-g4bccb38
2022-06-06 09:22:32 -04:00
init version: de40ad0
2019-01-25 08:10:59 -05:00
Security Options:
seccomp
2022-06-06 09:22:32 -04:00
Profile: builtin
cgroupns
2024-01-18 07:24:23 -05:00
Kernel Version: 6.5.11-linuxkit
Operating System: Alpine Linux v3.19
2019-01-25 08:10:59 -05:00
OSType: linux
2024-01-18 07:24:23 -05:00
Architecture: aarch64
CPUs: 10
Total Memory: 7.663GiB
Name: 4a7ed206a70d
ID: c20f7230-59a2-4824-a2f4-fda71c982ee6
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
2019-01-25 08:10:59 -05:00
Experimental: false
2023-04-10 08:14:29 -04:00
Insecure Registries:
2019-01-25 08:10:59 -05:00
127.0.0.0/8
Live Restore Enabled: false
2024-01-18 07:24:23 -05:00
Product License: Community Engine
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
2023-12-13 07:16:31 -05:00
Log: awslogs etwlogs fluentd gcplogs gelf json-file local 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
```