rans>Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

gatsby-source-docker-hub

CircleCI npm codecov

What is this?

A simple GatsbyJS source plugin allowing you to easily integrate stats from your Docker Hub profile in your Gatsby site. Just pass in a Docker Hub username, and get back your top 30 repos, sorted by pull count. It’s as simple as:

{
  allDockerHubRepo(sort: { order: DESC, fields: pullCount }) {
    edges {
      node {
        architectures
        description
        lastUpdated
        name
        pullCount
        starCount
      }
    }
  }
}

And get back something like the below:

{
  "data": {
    "allDockerHubRepo": {
      "edges": [
        {
          "node": {
            "architectures": [
              "amd64",
              "arm",
              "arm64"
            ],
            "description": "OwnTracks. Multiarch. 👌",
            "lastUpdated": "2019-08-13T00:27:34.154761Z",
            "name": "owntracks",
            "pullCount": 491351,
            "starCount": 3
          }
        },
        {
          "node": {
            "architectures": [
              "arm",
              "arm64",
              "amd64"
            ],
            "description": "Nightly multi-architecture (amd64, arm64, armv7) builds for the Kubernetes Helm tiller service.",
            "lastUpdated": "2019-08-13T00:27:56.305902Z",
            "name": "tiller",
            "pullCount": 376722,
            "starCount": 11
          }
      },
      { "//": "etc." }
    ]
  }
}

Note that this includes an array of architectures, for Docker images with multiarch support (i.e., containing a valid V2 Manifest, Schema 2).

Check out a simple proof-of-concept at multiar.ch (source code available here) 🎉

Docs
Tutorials
Plugins
Blog
Showcase