turbot/docker

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:

select
cmd,
args
from
dockerfile_cmd
where
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"]} |
+---------+--------------------------------------------------------------------------+

Documentation

Get started

Install

Download and install the latest Docker plugin:

steampipe plugin install docker

Credentials

No credentials are required.

Configuration

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 = [ "/path/to/Dockerfile", "/path/to/many/dockerfiles/*" ]
}
  • paths - A list of directory paths to search for Dockerfiles. Paths may include wildcards. File matches must start with Dockerfile or have an extension of .dockerfile.
  • 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