?
This document uses PHP Chinese website manual Release
顯示系統(tǒng)范圍內(nèi)的信息
docker info [OPTIONS]
名字,簡(jiǎn)寫 | 默認(rèn) | 描述 |
---|---|---|
--format, -f | 使用給定的Go模板格式化輸出 |
命令 | 描述 |
---|---|
docker | Docker CLI的基本命令。 |
此命令顯示有關(guān) Docker 安裝的系統(tǒng)范圍信息。顯示的信息包括內(nèi)核版本,容器數(shù)量和圖像。顯示的圖像數(shù)量是唯一圖像的數(shù)量。用不同名稱標(biāo)記的相同圖像只計(jì)算一次。
如果指定了格式,則將執(zhí)行給定模板而不是默認(rèn)格式。Go 的文本/模板包描述了格式的所有細(xì)節(jié)。
根據(jù)使用的存儲(chǔ)驅(qū)動(dòng)程序,可以顯示其他信息,例如池名稱,數(shù)據(jù)文件,元數(shù)據(jù)文件,使用的數(shù)據(jù)空間,總數(shù)據(jù)空間,使用的元數(shù)據(jù)空間以及總元數(shù)據(jù)空間。
數(shù)據(jù)文件是存儲(chǔ)圖像的位置,元數(shù)據(jù)文件是存儲(chǔ)關(guān)于這些圖像的元數(shù)據(jù)的位置。當(dāng)?shù)谝淮芜\(yùn)行時(shí),Docker 會(huì)從/var/lib/docker
掛載的卷上可用的空間中分配一定數(shù)量的數(shù)據(jù)空間和元數(shù)據(jù)空間。
以下示例顯示了使用devicemapper
存儲(chǔ)驅(qū)動(dòng)程序在 Red Hat Enterprise Linux 上運(yùn)行的守護(hù)程序的輸出。從輸出中可以看出,顯示了有關(guān)devicemapper
存儲(chǔ)驅(qū)動(dòng)程序的附加信息:
$ docker info Containers: 14 Running: 3 Paused: 1 Stopped: 10Images: 52Server Version: 1.10.3Storage Driver: devicemapper Pool Name: docker-202:2-25583803-pool Pool Blocksize: 65.54 kB Base Device Size: 10.74 GB Backing Filesystem: xfs Data file: /dev/loop0 Metadata file: /dev/loop1 Data Space Used: 1.68 GB Data Space Total: 107.4 GB Data Space Available: 7.548 GB Metadata Space Used: 2.322 MB Metadata Space Total: 2.147 GB Metadata Space Available: 2.145 GB Udev Sync Supported: true Deferred Removal Enabled: false Deferred Deletion Enabled: false Deferred Deleted Device Count: 0 Data loop file: /var/lib/docker/devicemapper/devicemapper/data Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata Library Version: 1.02.107-RHEL7 (2015-12-01)Execution Driver: native-0.2Logging Driver: json-file Plugins: Volume: local Network: null host bridge Kernel Version: 3.10.0-327.el7.x86_64 Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)OSType: linux Architecture: x86_64 CPUs: 1Total Memory: 991.7 MiB Name: ip-172-30-0-91.ec2.internal ID: I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S Docker Root Dir: /var/lib/docker Debug mode (client): falseDebug mode (server): falseUsername: gordontheturtle Registry: https://index.docker.io/v1/Insecure registries: myinsecurehost:5000 127.0.0.0/8
以下是在 Ubuntu 上運(yùn)行的守護(hù)進(jìn)程的示例輸出,使用 overlay2 存儲(chǔ)驅(qū)動(dòng)程序和屬于雙節(jié)點(diǎn)群集的節(jié)點(diǎn):
$ docker -D info Containers: 14 Running: 3 Paused: 1 Stopped: 10Images: 52Server Version: 1.13.0Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: falseLogging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Swarm: active NodeID: rdjq45w1op418waxlairloqbm Is Manager: true ClusterID: te8kdyw33n36fqiz74bfjeixd Managers: 1 Nodes: 2 Orchestration: Task History Retention Limit: 5 Raft: Snapshot Interval: 10000 Number of Old Snapshots to Retain: 0 Heartbeat Tick: 1 Election Tick: 3 Dispatcher: Heartbeat Period: 5 seconds CA Configuration: Expiry Duration: 3 months Root Rotation In Progress: false Node Address: 172.16.66.128 172.16.66.129 Manager Addresses: 172.16.66.128:2477Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 8517738ba4b82aff5662c97ca4627e7e4d03b531 runc version: ac031b5bf1cc92239461125f4c1ffb760522bbf2 init version: N/A (expected: v0.13.0)Security Options: apparmor seccomp Profile: defaultKernel Version: 4.4.0-31-generic Operating System: Ubuntu 16.04.1 LTS OSType: linux Architecture: x86_64 CPUs: 2Total Memory: 1.937 GiB Name: ubuntu ID: H52R:7ZR6:EIIA:76JG:ORIY:BVKF:GSFU:HNPG:B5MK:APSC:SZ3Q:N326 Docker Root Dir: /var/lib/docker Debug Mode (client): trueDebug Mode (server): true File Descriptors: 30 Goroutines: 123 System Time: 2016-11-12T17:24:37.955404361-08:00 EventsListeners: 0Http Proxy: http://test:test@proxy.example.com:8080Https Proxy: https://test:test@proxy.example.com:8080No Proxy: localhost,127.0.0.1,docker-registry.somecorporation.com Registry: https://index.docker.io/v1/WARNING: No swap limit support Labels: storage=ssd staging=trueExperimental: falseInsecure Registries: 127.0.0.0/8Registry Mirrors: http://192.168.1.2/ http://registry-mirror.example.com:5000/Live Restore Enabled: false
全局-D
選項(xiàng)會(huì)導(dǎo)致所有docker
命令輸出調(diào)試信息。
還可以指定輸出格式:
$ docker info --format '{{json .}}'{"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...}
docker info
以下是在 Windows Server 2016 上運(yùn)行的守護(hù)程序的示例輸出:
E:\docker>docker info Containers: 1 Running: 0 Paused: 0 Stopped: 1Images: 17Server Version: 1.13.0Storage Driver: windowsfilter Windows:Logging Driver: json-file Plugins: Volume: local Network: nat null overlay Swarm: inactive Default Isolation: process Kernel Version: 10.0 14393 (14393.206.amd64fre.rs1_release.160912-1937)Operating System: Windows Server 2016 Datacenter OSType: windows Architecture: x86_64 CPUs: 8Total Memory: 3.999 GiB Name: WIN-V0V70C0LU5P ID: NYMS:B5VK:UMSL:FVDZ:EWB5:FKVK:LPFL:FJMQ:H6FT:BZJ6:L2TD:XH62 Docker Root Dir: C:\control Debug Mode (client): falseDebug Mode (server): falseRegistry: https://index.docker.io/v1/Insecure Registries: 127.0.0.0/8Registry Mirrors: http://192.168.1.2/ http://registry-mirror.example.com:5000/Live Restore Enabled: false