A strict-mode Bash tool to fetch image tags from Docker Hub, GHCR, Quay.io, GCR, and Kubernetes registries with a single, intuitive interface.
dockertags solves the registry fragmentation problem - different container registries have different APIs, endpoints, authentication, and response formats. Instead of maintaining 5+ specialized scripts or fighting curl/jq pipelines, get a single command that works across all major registries.
For: DevOps engineers, Kubernetes operators, CI/CD builders, and anyone tired of copy-pasting registry-specific curl commands.
- ✅ Multi-registry support - Docker Hub, GHCR, Quay.io, GCR, registry.k8s.io
- ✅ Docker Hub account listing -
dockertags grafana→ listsloki,prometheus, etc. - ✅ Official image detection -
dockertags node→library/node/tags/automatically - ✅ Strict mode -
set -euo pipefail, no silent failures - ✅ Config-driven - registry quirks in lookup tables, core logic clean
- ✅ Semver filtering -
--latestshows only production tags - ✅ Pagination control -
--page-size=N
curl -sL https://raw.githubusercontent.com/specious/dockertags/main/dockertags > /usr/local/bin/dockertags
chmod +x /usr/local/bin/dockertagsRequirements: curl + jq
dockertags [OPTIONS] IMAGE
-q, --quiet Suppress pagination notices
-l, --latest Show latest/semver tags only
--page-size=N API page size (default: 100)
-v, --version Show version
-h, --help Show this help
DEBUG=1 Debug mode
dockertags node # Official image → library/node/tags/
dockertags busybox # Official image → library/busybox/tags/
dockertags grafana # Account → lists repositories
dockertags grafana/loki # Tags → 3.2.1, 3.1.0, latest
dockertags docker.io/grafana/loki # Fully qualifieddockertags quay.io/keycloak/keycloak # Quay tags
dockertags gcr.io/cloud-builders/docker # GCR tags
dockertags registry.k8s.io/kube-proxy # K8s tags
dockertags ghcr.io/hadolint/hadolint # GHCR (needs token)dockertags --page-size=50 grafana/loki # Smaller pages
dockertags -l grafana/loki # Semver only
dockertags -q node # No pagination notice
DEBUG=1 dockertags grafana # Debug mode| Registry | Account Listing | Tags | Notes |
|---|---|---|---|
| docker.io | ✅ grafana |
✅ | Full support |
| quay.io | ❌ | ✅ | JSON Accept header |
| gcr.io | ❌ | ✅ | OCI standard |
| registry.k8s.io | ❌ | ✅ | -L redirects |
| ghcr.io | ❌ | Needs OAuth token |
- Single config table -
REGISTRY_URL[$registry]with%s%sformat(repo,page_size) - Strict parsers -
REGISTRY_PARSER[$registry]- no fallbacks - Smart account detection (for docker.io) - Single names look up repositories under the account
- Official image auto-detection (for docker.io) -
alpinefetcheslibrary/alpine
Easy to extend - add new registries by extending these two arrays:
REGISTRY_URL["newreg.io"]="https://newreg.io/v2/%s/tags/list?n=%s"
REGISTRY_PARSER["newreg.io"]='.tags[] | select(. != null)'Production-ready for Docker Hub, Quay, GCR, K8s. GHCR needs token auth (OAuth2 flow WIP).
ISC License - Copyright (c) 2026 Ildar Sagdejev