github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/docs/reference/commandline/info.md (about) 1 --- 2 title: "info" 3 description: "The info command description and usage" 4 keywords: "display, docker, information" 5 --- 6 7 <!-- This file is maintained within the docker/cli GitHub 8 repository at https://github.com/docker/cli/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # info 17 18 ```markdown 19 Usage: docker info [OPTIONS] 20 21 Display system-wide information 22 23 Options: 24 -f, --format string Format the output using the given Go template 25 --help Print usage 26 ``` 27 28 ## Description 29 30 This command displays system wide information regarding the Docker installation. 31 Information displayed includes the kernel version, number of containers and images. 32 The number of images shown is the number of unique images. The same image tagged 33 under different names is counted only once. 34 35 If a format is specified, the given template will be executed instead of the 36 default format. Go's [text/template](http://golang.org/pkg/text/template/) package 37 describes all the details of the format. 38 39 Depending on the storage driver in use, additional information can be shown, such 40 as pool name, data file, metadata file, data space used, total data space, metadata 41 space used, and total metadata space. 42 43 The data file is where the images are stored and the metadata file is where the 44 meta data regarding those images are stored. When run for the first time Docker 45 allocates a certain amount of data space and meta data space from the space 46 available on the volume where `/var/lib/docker` is mounted. 47 48 ## Examples 49 50 ### Show output 51 52 The example below shows the output for a daemon running on Red Hat Enterprise Linux, 53 using the `devicemapper` storage driver. As can be seen in the output, additional 54 information about the `devicemapper` storage driver is shown: 55 56 ```bash 57 $ docker info 58 59 Containers: 14 60 Running: 3 61 Paused: 1 62 Stopped: 10 63 Images: 52 64 Server Version: 1.10.3 65 Storage Driver: devicemapper 66 Pool Name: docker-202:2-25583803-pool 67 Pool Blocksize: 65.54 kB 68 Base Device Size: 10.74 GB 69 Backing Filesystem: xfs 70 Data file: /dev/loop0 71 Metadata file: /dev/loop1 72 Data Space Used: 1.68 GB 73 Data Space Total: 107.4 GB 74 Data Space Available: 7.548 GB 75 Metadata Space Used: 2.322 MB 76 Metadata Space Total: 2.147 GB 77 Metadata Space Available: 2.145 GB 78 Udev Sync Supported: true 79 Deferred Removal Enabled: false 80 Deferred Deletion Enabled: false 81 Deferred Deleted Device Count: 0 82 Data loop file: /var/lib/docker/devicemapper/devicemapper/data 83 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata 84 Library Version: 1.02.107-RHEL7 (2015-12-01) 85 Execution Driver: native-0.2 86 Logging Driver: json-file 87 Plugins: 88 Volume: local 89 Network: null host bridge 90 Kernel Version: 3.10.0-327.el7.x86_64 91 Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo) 92 OSType: linux 93 Architecture: x86_64 94 CPUs: 1 95 Total Memory: 991.7 MiB 96 Name: ip-172-30-0-91.ec2.internal 97 ID: I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S 98 Docker Root Dir: /var/lib/docker 99 Debug mode (client): false 100 Debug mode (server): false 101 Username: gordontheturtle 102 Registry: https://index.docker.io/v1/ 103 Insecure registries: 104 myinsecurehost:5000 105 127.0.0.0/8 106 ``` 107 108 ### Show debugging output 109 110 Here is a sample output for a daemon running on Ubuntu, using the overlay2 111 storage driver and a node that is part of a 2-node swarm: 112 113 ```bash 114 $ docker -D info 115 116 Containers: 14 117 Running: 3 118 Paused: 1 119 Stopped: 10 120 Images: 52 121 Server Version: 1.13.0 122 Storage Driver: overlay2 123 Backing Filesystem: extfs 124 Supports d_type: true 125 Native Overlay Diff: false 126 Logging Driver: json-file 127 Cgroup Driver: cgroupfs 128 Plugins: 129 Volume: local 130 Network: bridge host macvlan null overlay 131 Swarm: active 132 NodeID: rdjq45w1op418waxlairloqbm 133 Is Manager: true 134 ClusterID: te8kdyw33n36fqiz74bfjeixd 135 Managers: 1 136 Nodes: 2 137 Orchestration: 138 Task History Retention Limit: 5 139 Raft: 140 Snapshot Interval: 10000 141 Number of Old Snapshots to Retain: 0 142 Heartbeat Tick: 1 143 Election Tick: 3 144 Dispatcher: 145 Heartbeat Period: 5 seconds 146 CA Configuration: 147 Expiry Duration: 3 months 148 Root Rotation In Progress: false 149 Node Address: 172.16.66.128 172.16.66.129 150 Manager Addresses: 151 172.16.66.128:2477 152 Runtimes: runc 153 Default Runtime: runc 154 Init Binary: docker-init 155 containerd version: 8517738ba4b82aff5662c97ca4627e7e4d03b531 156 runc version: ac031b5bf1cc92239461125f4c1ffb760522bbf2 157 init version: N/A (expected: v0.13.0) 158 Security Options: 159 apparmor 160 seccomp 161 Profile: default 162 Kernel Version: 4.4.0-31-generic 163 Operating System: Ubuntu 16.04.1 LTS 164 OSType: linux 165 Architecture: x86_64 166 CPUs: 2 167 Total Memory: 1.937 GiB 168 Name: ubuntu 169 ID: H52R:7ZR6:EIIA:76JG:ORIY:BVKF:GSFU:HNPG:B5MK:APSC:SZ3Q:N326 170 Docker Root Dir: /var/lib/docker 171 Debug Mode (client): true 172 Debug Mode (server): true 173 File Descriptors: 30 174 Goroutines: 123 175 System Time: 2016-11-12T17:24:37.955404361-08:00 176 EventsListeners: 0 177 Http Proxy: http://test:test@proxy.example.com:8080 178 Https Proxy: https://test:test@proxy.example.com:8080 179 No Proxy: localhost,127.0.0.1,docker-registry.somecorporation.com 180 Registry: https://index.docker.io/v1/ 181 WARNING: No swap limit support 182 Labels: 183 storage=ssd 184 staging=true 185 Experimental: false 186 Insecure Registries: 187 127.0.0.0/8 188 Registry Mirrors: 189 http://192.168.1.2/ 190 http://registry-mirror.example.com:5000/ 191 Live Restore Enabled: false 192 ``` 193 194 The global `-D` option causes all `docker` commands to output debug information. 195 196 ### Format the output 197 198 You can also specify the output format: 199 200 ```bash 201 $ docker info --format '{{json .}}' 202 203 {"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...} 204 ``` 205 206 ### Run `docker info` on Windows 207 208 Here is a sample output for a daemon running on Windows Server 2016: 209 210 ```none 211 E:\docker>docker info 212 213 Containers: 1 214 Running: 0 215 Paused: 0 216 Stopped: 1 217 Images: 17 218 Server Version: 1.13.0 219 Storage Driver: windowsfilter 220 Windows: 221 Logging Driver: json-file 222 Plugins: 223 Volume: local 224 Network: nat null overlay 225 Swarm: inactive 226 Default Isolation: process 227 Kernel Version: 10.0 14393 (14393.206.amd64fre.rs1_release.160912-1937) 228 Operating System: Windows Server 2016 Datacenter 229 OSType: windows 230 Architecture: x86_64 231 CPUs: 8 232 Total Memory: 3.999 GiB 233 Name: WIN-V0V70C0LU5P 234 ID: NYMS:B5VK:UMSL:FVDZ:EWB5:FKVK:LPFL:FJMQ:H6FT:BZJ6:L2TD:XH62 235 Docker Root Dir: C:\control 236 Debug Mode (client): false 237 Debug Mode (server): false 238 Registry: https://index.docker.io/v1/ 239 Insecure Registries: 240 127.0.0.0/8 241 Registry Mirrors: 242 http://192.168.1.2/ 243 http://registry-mirror.example.com:5000/ 244 Live Restore Enabled: false 245 ```