Skip to content

Latest commit

 

History

History
95 lines (70 loc) · 3.66 KB

index.md

File metadata and controls

95 lines (70 loc) · 3.66 KB
organization category icon_url brand_color display_name short_name description og_description og_image engines
Turbot
software development
/images/plugins/turbot/dockerhub.svg
#096BD4
Docker Hub
dockerhub
Steampipe plugin for querying Docker Hub repositories, tags and other resources.
Query Docker Hub with SQL! Open source CLI. No DB required.
/images/plugins/turbot/dockerhub-social-graphic.png
steampipe
sqlite
postgres
export

Docker Hub + Steampipe

Docker Hub is a cloud-based repository and distribution service provided by Docker that allows developers to store and share container images.

Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

List your Docker Hub Repositories:

select
  name,
  pull_count,
  star_count,
  is_private,
  last_updated
from
  dockerhub_repository;
+------------------------+------------+------------+------------+---------------------------+
| name                   | pull_count | star_count | is_private | last_updated              |
+------------------------+------------+------------+------------+---------------------------+
| souravthe/test         | <null>     | <null>     | false      | 2023-07-17T18:26:25+05:30 |
| souravthe/test-private | <null>     | <null>     | true       | 2023-07-17T18:32:56+05:30 |
+------------------------+------------+------------+------------+---------------------------+

Documentation

Quick start

Install

Download and install the latest Docker Hub plugin:

steampipe plugin install dockerhub

Credentials

Item Description
Credentials Docker Hub plugin requires username and password.
Permissions NA
Radius Each connection represents one Docker Hub user.
Resolution 1. Credentials explicitly set in a steampipe config file (~/.steampipe/config/dockerhub.spc).
2. Credentials specified in environment variables, e.g., DOCKER_HUB_USERNAME and DOCKER_HUB_PASSWORD.

Configuration

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

Configure your account details in ~/.steampipe/config/dockerhub.spc:

connection "dockerhub" {
  plugin = "dockerhub"

  # DockerHub Username. Required.
  # This can also be set via the 'DOCKER_HUB_USERNAME' environment variable.
  # username = "turbot"

  # DockerHub Password. Required.
  # This can also be set via the 'DOCKER_HUB_PASSWORD' environment variable.
  # password = "turbot@123"

  # DockerHub 2FA Code. Required when 2FA is enabled.
  # two_factor_code = "123456"
}

Alternatively, you can also use the standard Docker Hub environment variables to configure your credentials only if other arguments (username and password) are not specified in the connection:

export DOCKER_HUB_USERNAME=turbot
export DOCKER_HUB_PASSWORD=turbot@123