Skip to main content

Docker

Docker is a containerization platform that enables developers to build, ship, and run applications in isolated, lightweight containers. This integration provides comprehensive visibility and querying capabilities across Docker environments, including Docker Compose configurations, Docker Engine resources, Dockerfiles, and DockerHub repositories.

CategoryContainers
DirectionQuery source
Sign-inLocal Docker Engine, Docker Engine TLS
Query languagesSQLite
Tables11
Query templates38
Websitedocker.com

Before you start​

Huntbase signs in to Docker with Docker Engine TLS. Create the credential in Docker first, then keep it to hand for the Connect step.

  1. On the Docker host, start the daemon with TLS verification so it only accepts clients that hold a certificate signed by your CA: dockerd --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem -H=0.0.0.0:2376.
  2. Create a client key and certificate signing request, then sign it with your CA using extendedKeyUsage = clientAuth.
  3. Put the CA certificate, client certificate and client key in one directory as ca.pem, cert.pem and key.pem.
Watch out for
  • Anyone who holds the client key can send any instruction to the Docker daemon, which gives them root access to the host. Guard these keys as you would a root password.

For the vendor's own instructions, see Docker daemon socket protection documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect Docker​

  1. Go to Connections and click New connection, or click New connection on the Docker product page.
  2. On Product, pick Docker and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Settings​

Where your Docker lives:

FieldRequiredNotes
Dockerfile PathsNo
Docker Compose File PathsNo
Docker Engine HostNoThe Docker Engine endpoint, such as tcp://docker.example.com:2376. TCP port 2376 is the conventional TLS port.
Docker API VersionNoOptional. A Docker Engine API version, such as 1.41.
TLS VerifyNo

Credentials​

Choose a Method, enter a Credential label (for example Production), then fill in the fields for that method.

Local Docker Engine​

No fields — choose this method to connect without credentials.

Docker Engine TLS​

FieldRequiredNotes
Certificate PathNoThe directory that contains ca.pem, cert.pem and key.pem, not the path to a single file. Secret — not shown again after you save it.

Query it​

Once connected, Docker can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 11 tables listed below, alongside every other connected source.

Example: SQLite​

Get Docker info — Retrieve comprehensive details about your Docker environment to better understand its current state and configuration.

select
*
from
docker_info;

Docker ships with 38 query templates. Find them in Library › Queries — see Query templates.

Tables​

Docker adds 11 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 11 tables
TableContains
docker_compose_configList all configs from the Docker compose files.
docker_compose_networkList all networks from the Docker compose files.
docker_compose_secretList all secrets from the Docker compose files.
docker_compose_serviceList all services from the Docker compose files.
docker_compose_volumeList all volumes from the Docker compose files.
docker_containerList all containers from the Docker engine.
docker_imageList all images from the Docker engine.
docker_infoList all information from the Docker engine.
docker_networkList all networks from the Docker engine.
docker_volumeList all volumes from the Docker engine.
dockerfile_instructionList all instructions from the Dockerfile.

Next steps​