A SQL-like interface for docker registries.
Early stage project
SQL-like query interface is still one of the easiest to understand methods to query any collection of data. Dockerql brings this familiar interface to the docker registry world.
Dockerql provides a read-only SQL query interface to docker registries.
Ket features:
- Supports DockerHub, Amazon Container Registry, and Google Container Registry.
- Handle in a uniform way the various authentication flow for each docker registry implementation.
- Developed in JavaScript.
- NPM Package: Available for use within any node application.
- Local Service: Clone from gihub and run as a local service.
- DockerHub: Available from DockerHub as a prepackaged docker image.
- Install dockerql:
npm install -i dockerql --save
- Use dockerql:
import * as dockerql from 'dockerql'
...
try {
// setup the dockerql option, for now this means loglevel
dockerql.init()
// connect to a registry, in this case dockerhub with anonymous access
await dockerql.connect({ name: "dockerhub", type: "dockerhub" })
// select the list of repos
const rsp = await dockerql.query(`SELECT repo, stars, pulls FROM repos`)
// catch errors
if (rsp.code !== 200) {
console.error(rsp.message)
return
}
...
} catch (err) {
console.log("Error ", err)
}
...
See the full simple example, or try it in replit.
dockerql can be run as a standalone service exposing a query endpoint as well as an npm package.
Here are few different ways to quickly get started with running dockerql as a service.
- Run as a docker container.
- Run as a local service.
- Set up the service access to your registries.
Currently supported:
- Set up access to Dockerhub
- Set up access to Amazon Elastic Container Registry (ECR)
- Set up access to Google Container Registry (GCR)
- docekrql docs.
dockerQL
|
└─ examples
| └─ simple
|
└─ lib # packaging of dockerQL as an npm package
|
└─ server # api server servicing dockerql via REST api