steampipe plugin install docker

Table: docker_image - Query Docker Images using SQL

Docker Images are read-only templates that you use to create Docker containers. They are the building blocks of a Docker container and contain the necessary components to run an application. Docker Images are created from a set of instructions, known as a Dockerfile, and can be stored and shared across different Docker hosts.

Table Usage Guide

The docker_image table provides insights into Docker Images within the Docker system. As a DevOps engineer, you can explore image-specific details through this table, including image ID, parent ID, and image size. Utilize it to uncover information about images, such as those with specific tags, the layers within each image, and the verification of image metadata.

Examples

List all images

Explore all available images within your Docker system using this query. It's useful for quickly assessing the overall state of your Docker images, helping you manage resources and plan for future needs.

select
*
from
docker_image;
select
*
from
docker_image;

Find an image by tag

Explore which Docker images are associated with a specific tag, such as 'postgres:latest'. This can be useful in managing and organizing your Docker images based on their tags.

select
*
from
docker_image
where
repo_tags ? 'postgres:latest'
Error: SQLite does not support the '?' operator for checking the existence of a key in a JSON object.

Schema for docker_image

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
createdtimestamp with time zoneTime when the image was created.
idtextID of the image.
labelsjsonbLabels for the image.
parent_idtextParent ID of the image.
repo_digestsjsonbRepository digests for the image.
repo_tagsjsonbRepository tags for the image.
sizebigintSize of the image in bytes.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
virtual_sizebigintVirtual size of the image in bytes.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- docker

You can pass the configuration to the command with the --config argument:

steampipe_export_docker --config '<your_config>' docker_image