turbot/docker_compliance

Query: docker_container_cgroup_usage

Usage

powerpipe query docker_compliance.query.docker_container_cgroup_usage

Steampipe Tables

SQL

select
id as resource,
case
when inspect -> 'HostConfig' ->> 'CgroupParent' = '' then 'ok'
else 'alarm'
end as status,
case
when inspect -> 'HostConfig' ->> 'CgroupParent' = '' then (names ->> 0) || ' are not running under the default Docker cgroup.'
else (names ->> 0) || ' are running under the default Docker cgroup.'
end as reason
, _ctx ->> 'connection_name' as connection_name
from
docker_container;

Controls

The query is being used by the following controls: