In this section, we present how to connect Docker Hub repository to MindsDB.

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

Data from Docker Hub can be utilized within MindsDB to train models and make predictions about Docker Hub repositories.


This handler is implemented using the requests library that makes http calls to

The required arguments to establish a connection are as follows:

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

Read about creating an account here.

Here is how to connect to Docker Hub using MindsDB:

CREATE DATABASE dockerhub_datasouce
WITH ENGINE = 'dockerhub',
  "username": "username",
  "password": "password"

If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/dockerhub_handler) and run this command: pip install -r requirements.txt.


Now, you can query Docker Hub as follows:

SELECT * FROM dockerhub_datasouce.repo_images_summary WHERE namespace="docker" AND repository="trusted-registry-nginx";

Both the namespace and repository parameters are required in the WHERE clause.