DockerInfo - Comand /usr/bin/docker info

This parser reads the output of /usr/bin/docker info.

The resulting data structure is avaible in the data member of the class and takes the form of a dictionary whose keys are the “keys” in the output (the string before the :) and whose values are the values (the string following the :), all stripped of leading and trailing spaces.

Sample output:

Containers: 0
Images: 0
Server Version: 1.9.1
Storage Driver: devicemapper
Pool Name: rhel-docker--pool
Pool Blocksize: 524.3 kB
Base Device Size: 107.4 GB
Backing Filesystem: xfs
Data file:
Metadata file:
Data Space Used: 62.39 MB
Data Space Total: 3.876 GB
Data Space Available: 3.813 GB
Metadata Space Used: 40.96 kB
Metadata Space Total: 8.389 MB
Metadata Space Available: 8.348 MB
Udev Sync Supported: true
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.107-RHEL7 (2015-12-01)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.10.0-327.el7.x86_64
CPUs: 1
Total Memory: 993 MiB


>>> docker_info = shared[DockerInfo]

If the command does not return the information (for example, the Docker daemon isn’t running, the data dictionary is empty.

class insights.parsers.dockerinfo.DockerInfo(context, extra_bad_lines=None)[source]

Bases: insights.core.CommandParser

Represents the output of the /usr/bin/docker info command.

The resulting output of the command is essentially key/value pairs.


This method must be implemented by classes based on this class.