'Runs docker inspect on a container and returns json response as python dictionary inspect_data.
:type container_id: str
:param container_id: a docker container ID
:returns: inspect_data, a dict of docker inspect output'

def inspect_container(self, container_id):

    command = self.attr.viz_config.get('docker', 'command')
    command = command.format(docker_args=('inspect    %s' % container_id))
    log.info('Inspecting    docker    container    {0}    with    command    [{1}]'.format(container_id, command))
    p = Popen(command, stdout=PIPE, stderr=PIPE, close_fds=True, shell=True)
    (stdout, stderr) = p.communicate()
    if (p.returncode != 0):
        log.error(('%s\n%s' % (stdout, stderr)))
        return None
    inspect_data = json.loads(stdout)
    return inspect_data
