c34f7862创建于 1月15日历史提交
README.md

DockerHub Handler

DockerHub handler for MindsDB provides interfaces to connect to DockerHub via APIs and pull repository data into MindsDB.


Table of Contents


About DockerHub

Docker Hub is the world's easiest way to create, manage, and deliver your team's container applications.

DockerHub Handler Implementation

This handler was implemented using the requests library that makes http calls to https://docs.docker.com/docker-hub/api/latest/#tag/resources.

DockerHub Handler Initialization

The DockerHub handler is initialized with the following parameters:

  • username: Username used to login to DockerHub
  • password: Password used to login to DockerHub

Read about creating an account here.

Implemented Features

  • DockerHub Repo Images Summary for a given Repository
    • Support SELECT
      • Support LIMIT
      • Support WHERE
      • Support ORDER BY
      • Support column selection

Example Usage

The first step is to create a database with the new dockerhub engine.

CREATE DATABASE mindsdb_dockerhub
WITH ENGINE = 'dockerhub',
PARAMETERS = {
  "username": "user",
  "password": "pass"
};

Use the established connection to query your database:

SELECT * FROM mindsdb_dockerhub.repo_images_summary WHERE namespace="docker" AND repository="trusted-registry-nginx";
SELECT * FROM mindsdb_dockerhub.repo_images WHERE namespace="docker" AND repository="trusted-registry-nginx";
SELECT * FROM mindsdb_dockerhub.repo_tag_details WHERE namespace="docker" AND repository="trusted-registry-nginx" AND tag="latest";
SELECT * FROM mindsdb_dockerhub.repo_tags WHERE namespace="docker" AND repository="trusted-registry-nginx";

======= SELECT * FROM mindsdb_dockerhub.org_settings where organization="docker";