steampipe plugin install dockersteampipe plugin install docker

Docker + Steampipe

Docker provides OS-level virtualization to deliver software in packages called containers.

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

Query commands from a Dockerfile:

path = '/my/Dockerfile';
| cmd | data |
| from | {"image":"node","tag":"12-alpine"} |
| run | {"commands":["apk add --no-cache python g++ make"],"prepend_shell":true} |
| workdir | {"path":"/app"} |
| copy | {"dest":".","sources":["."]} |
| run | {"commands":["yarn install --production"],"prepend_shell":true} |
| cmd | {"commands":["node","src/index.js"]} |


Get started


Download and install the latest Docker plugin:

steampipe plugin install docker


No credentials are required.


Installing the latest docker plugin will create a config file (~/.steampipe/config/docker.spc) with a single connection named docker:

connection "docker" {
plugin = "docker"
# Paths is a list of locations to search for Dockerfiles
# All paths are resolved relative to the current working directory (CWD)
# Wildcard based searches are supported, including recursive searches
# For example:
# - "*.dockerfile" matches all Dockerfiles in the CWD
# - "**/*.dockerfile" matches all Dockerfiles in the CWD and all sub-directories
# - "../*.dockerfile" matches all Dockerfiles in the CWD's parent directory
# - "Dockerfile.*" matches all Dockerfiles starting with "Dockerfile" in the CWD
# - "/path/to/dir/*.dockerfile" matches all Dockerfiles in a specific directory
# - "/path/to/dir/Dockerfile" matches a specific file
# If paths includes "*", all files (including non-Dockerfiles) in
# the CWD will be matched, which may cause errors if incompatible file types exist
# Defaults to CWD
paths = [ "Dockerfile", "*.dockerfile" ]
# Optional docker engine configuration.
# host = "tcp://"
# cert_path = "/path/to/my-cert"
# api_version = "1.41"
# tls_verify = true
  • paths - A list of directory paths to search for Dockerfiles. Paths are resolved relative to the current working directory. Paths may include wildcards and also supports ** for recursive matching. Defaults to the current working directory.
  • host - Location of the docker engine endpoint. Defaults to DOCKER_HOST env var.
  • api_version - API version to use. Defaults to DOCKER_API_VERSION env var.
  • cert_path - Path to a custom TLS certificate. Defaults to DOCKER_CERT_PATH env var.
  • tls_verify - Flag to control TLS verification. Defaults to DOCKER_TLS_VERIFY env var.

Get involved