docker info命令的使用和返回结果描述

docker info命令的使用和返回结果描述
查看docker的详细信息在命令行输入 docker info 即可

[root@xxwlog cadvisor]# docker info
Client:								#docker客户端信息
 Debug Mode: false

Server:								#docker服务器端信息
 Containers: 2  						#容器数量
  Running: 1  							#正在运行的数量
  Paused: 0  							#暂停的数量
  Stopped: 1 							#已停止的数量
 Images: 10							#镜像数量
 Server Version: 19.03.12			#docker服务器版本		
 Storage Driver: overlay2			#docker存储驱动程序
  Backing Filesystem: xfs			#文件系统
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file		#日志驱动程序
 Cgroup Driver: cgroupfs		#Cgroup驱动程序
 Plugins:		            	#插件信息
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive						#Swarm状态
 Runtimes: runc							#runtimes信息
 Default Runtime: runc				                #默认runtime
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:					        #安全选项
  seccomp
   Profile: default
 Kernel Version: 3.10.0-1127.el7.x86_64                          #linux内核版本
 Operating System: CentOS Linux 7 (Core)                         #linux操作系统
 OSType: linux 						       #操作系统类型
 Architecture: x86_64
 CPUs: 1 						#宿主机CPU数量
 Total Memory: 972.3MiB				        #宿主机内存
 Name: xxwlog						#宿主机名称
 ID: TJWU:XZF3:PBLD:DD3S:6FBT:VGY2:HA6P:JTHE:FFUD:7R3Y:JLUY:J62F
 Docker Root Dir: /var/lib/docker                          #docker根目录
 Debug Mode: false
 Registry: https://index.docker.io/v1/                    #镜像仓库
 Labels:
 Experimental: false
 Insecure Registries:                                   #非安全镜像仓库
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

可以通过以下命令进行json格式化输出

docker info --format '{{json .}}'

输出结果如下

{
  "ID": "TJWU:XZF3:PBLD:DD3S:6FBT:VGY2:HA6P:JTHE:FFUD:7R3Y:JLUY:J62F",
  "Containers": 2,
  "ContainersRunning": 1,
  "ContainersPaused": 0,
  "ContainersStopped": 1,
  "Images": 10,
  "Driver": "overlay2",
  "DriverStatus": [
    [
      "Backing Filesystem",
      "xfs"
    ],
    [
      "Supports d_type",
      "true"
    ],
    [
      "Native Overlay Diff",
      "true"
    ]
  ],
  "SystemStatus": null,
  "Plugins": {
    "Volume": [
      "local"
    ],
    "Network": [
      "bridge",
      "host",
      "ipvlan",
      "macvlan",
      "null",
      "overlay"
    ],
    "Authorization": null,
    "Log": [
      "awslogs",
      "fluentd",
      "gcplogs",
      "gelf",
      "journald",
      "json-file",
      "local",
      "logentries",
      "splunk",
      "syslog"
    ]
  },
  "MemoryLimit": true,
  "SwapLimit": true,
  "KernelMemory": true,
  "KernelMemoryTCP": true,
  "CpuCfsPeriod": true,
  "CpuCfsQuota": true,
  "CPUShares": true,
  "CPUSet": true,
  "PidsLimit": true,
  "IPv4Forwarding": true,
  "BridgeNfIptables": false,
  "BridgeNfIp6tables": false,
  "Debug": false,
  "NFd": 27,
  "OomKillDisable": true,
  "NGoroutines": 39,
  "SystemTime": "2020-08-24T04:42:44.368253045-04:00",
  "LoggingDriver": "json-file",
  "CgroupDriver": "cgroupfs",
  "NEventsListener": 0,
  "KernelVersion": "3.10.0-1127.el7.x86_64",
  "OperatingSystem": "CentOS Linux 7 (Core)",
  "OSType": "linux",
  "Architecture": "x86_64",
  "IndexServerAddress": "https://index.docker.io/v1/",
  "RegistryConfig": {
    "AllowNondistributableArtifactsCIDRs": [],
    "AllowNondistributableArtifactsHostnames": [],
    "InsecureRegistryCIDRs": [
      "127.0.0.0/8"
    ],
    "IndexConfigs": {
      "docker.io": {
        "Name": "docker.io",
        "Mirrors": [],
        "Secure": true,
        "Official": true
      }
    },
    "Mirrors": []
  },
  "NCPU": 1,
  "MemTotal": 1019580416,
  "GenericResources": null,
  "DockerRootDir": "/var/lib/docker",
  "HttpProxy": "",
  "HttpsProxy": "",
  "NoProxy": "",
  "Name": "xxwlog",
  "Labels": [],
  "ExperimentalBuild": false,
  "ServerVersion": "19.03.12",
  "ClusterStore": "",
  "ClusterAdvertise": "",
  "Runtimes": {
    "runc": {
      "path": "runc"
    }
  },
  "DefaultRuntime": "runc",
  "Swarm": {
    "NodeID": "",
    "NodeAddr": "",
    "LocalNodeState": "inactive",
    "ControlAvailable": false,
    "Error": "",
    "RemoteManagers": null
  },
  "LiveRestoreEnabled": false,
  "Isolation": "",
  "InitBinary": "docker-init",
  "ContainerdCommit": {
    "ID": "7ad184331fa3e55e52b890ea95e65ba581ae3429",
    "Expected": "7ad184331fa3e55e52b890ea95e65ba581ae3429"
  },
  "RuncCommit": {
    "ID": "dc9208a3303feef5b3839f4323d9beb36df0a9dd",
    "Expected": "dc9208a3303feef5b3839f4323d9beb36df0a9dd"
  },
  "InitCommit": {
    "ID": "fec3683",
    "Expected": "fec3683"
  },
  "SecurityOptions": [
    "name=seccomp,profile=default"
  ],
  "Warnings": [
    "WARNING: bridge-nf-call-iptables is disabled",
    "WARNING: bridge-nf-call-ip6tables is disabled"
  ],
  "ClientInfo": {
    "Debug": false,
    "Plugins": [],
    "Warnings": null
  }
}
原文地址:https://www.cnblogs.com/xwxz/p/13554777.html