{"id":16241452,"url":"https://github.com/bcsabaengine/docker-hub-tags","last_synced_at":"2026-04-30T10:05:37.564Z","repository":{"id":213831546,"uuid":"735008827","full_name":"BCsabaEngine/docker-hub-tags","owner":"BCsabaEngine","description":"NodeJS lib, with which you can easily find the latest version of Docker Hub images.","archived":false,"fork":false,"pushed_at":"2023-12-24T11:09:46.000Z","size":163,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T01:23:33.268Z","etag":null,"topics":["dockerhub","nodejs","typescript","versions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BCsabaEngine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-23T10:39:51.000Z","updated_at":"2024-06-23T12:29:53.000Z","dependencies_parsed_at":"2023-12-23T15:26:58.424Z","dependency_job_id":"77f30627-8ed2-45bc-adf1-270693992d52","html_url":"https://github.com/BCsabaEngine/docker-hub-tags","commit_stats":null,"previous_names":["bcsabaengine/docker-hub-tags"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BCsabaEngine/docker-hub-tags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fdocker-hub-tags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fdocker-hub-tags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fdocker-hub-tags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fdocker-hub-tags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BCsabaEngine","download_url":"https://codeload.github.com/BCsabaEngine/docker-hub-tags/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fdocker-hub-tags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32460809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dockerhub","nodejs","typescript","versions"],"created_at":"2024-10-10T14:07:41.803Z","updated_at":"2026-04-30T10:05:37.535Z","avatar_url":"https://github.com/BCsabaEngine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://flat.badgen.net/badge/use/TypeScript/blue)\n![](https://flat.badgen.net/badge/use/npm/orange)\n![](https://flat.badgen.net/badge/use/jest/green)\n![](https://flat.badgen.net/badge/use/lint/purple)\n\n[![DEV pipeline](https://github.com/BCsabaEngine/docker-hub-tags/actions/workflows/ci-dev.yaml/badge.svg)](https://github.com/BCsabaEngine/docker-hub-tags/actions/workflows/ci-dev.yaml)\n\n# Docker-Hub-Tags\n\nNodeJS lib, with which you can easily find the latest version of Docker Hub images.\n\nI also publish my own applications in docker images and use [Docker HUB](https://hub.docker.com/) for this. Several times I ran into the fact that many or very many images are published, it is difficult to find if there is a more recent version. And the names of the images and tags are also quite varied, it is difficult to navigate them.\n\nIf you want to access the list of images of a Docker Repository from a NodeJS application and search it with semantic versioning, then you have found the solution: npm, TypeScript, well tested!\n\n## Install\n\n```bash\n# install package from npmjs\nnpm i docker-hub-tags\n```\n\n## Usage\n\nThe very first step is to download the Docker Hub repository information. You can initialize the DockerHubTags class with this. After that, you can perform one or more actions or searches without internet traffic.\n\n- Access the repositories belonging to the (community) user namespace (eg: adobeapiplatform/apigateway, openebs/mayastor-casperf, etc.)\n- Access the Official Images (eg: Node, Nginx, Ubuntu, Python, Redis, Mysql, etc.)\n\n```bash\n# namespace in community\nconst dht = await DockerHubTags.init('adobeapiplatform', 'apigateway');\n\n# official image category\nconst dht = await DockerHubTags.init(OFFICIALIMAGES_NAMESPACE, 'node');\n```\n\n### Filter and limit\n\nYou have the option to filter the images if you are only interested in the images of one platform. You can limit the amount of downloaded data for performance reasons. (By default it downloads 1000 tags, this requires 10 steps/page, usually enough)\n\n```bash\nconst dht = await DockerHubTags.init(\n    OFFICIALIMAGES_NAMESPACE,\n    'node',\n    # retrieve linux/arm64 images only\n    {\n        os: 'linux',\n        architecture: 'arm64'\n    },\n    # fetch 300 taginfos only\n    { limit: 300 }\n);\n```\n\n### Cache\n\nYou can easily save the data you have already downloaded so that you can load it again later. You can create a storage service that caches the data for a day, for example.\n\n```bash\nconst dht = await DockerHubTags.init(OFFICIALIMAGES_NAMESPACE, 'node');\nconst savedData = dht.exportToJson();\n\n# Later...\nconst dhtFromFile = DockerHubTags.createFromJson(savedData);\n```\n\n### Query\n\nThe most important part is that you can extract detailed information about the members. All tag information contains the tag, its images and other tags equal to the tag (sameTags: current-bookworm = 21.5.0-bookworm)\n\n```bash\nconst dht = await DockerHubTags.init(OFFICIALIMAGES_NAMESPACE, 'node');\n\n# One tag\ndht.getTag('20.10-bookworm');\n\n# Latest tag (if exists)\ndht.getLatest();\n\n# All tags\ndht.getAllTags();\n```\n\n### Query for recent version\n\nBased on the member information, you can easily find out whether there is a newer version for the current version. You can use the rules of semantic versioning. We have added a special rule to the set. An exclamation mark (!) indicates that it will provide a parity version.\n\n```bash\nconst dht = await DockerHubTags.init(OFFICIALIMAGES_NAMESPACE, 'node');\n\n# patch version (~20.0.5 -\u003e 20.0.11)\ndht.getRecent('~20.0');\n\n# minor version (^20.0 -\u003e 20.11)\ndht.getRecent('^20.0');\n\n# major version (^20.0 -\u003e 21.9)\ndht.getRecent('20.0');\n\n# majorParity version (!18.0 -\u003e 20.10)\ndht.getRecent('!18.0');\n\n# majorParity version (!19.0 -\u003e 21.5)\ndht.getRecent('!19.0');\n\n# postfixed version (20.1-bookworm-slim -\u003e 21.9-bookworm-slim)\ndht.getRecent('20.1-bookworm-slim');\n```\n\nThis is the general structure of a result set. You can easily extract the necessary information from it.\n\n```bash\n{\n  name: 'latest',\n  tag_status: 'active',\n  content_type: 'image',\n  full_size: 400342209,\n  last_updated: 2023-12-20T22:00:44.304Z,\n  digest: 'sha256:73a9c498369c6....',\n  images: [\n\t{\n\t  os: 'linux',\n\t  architecture: 'arm64',\n\t  variant: 'v8',\n\t  size: 390989031,\n\t  status: 'active',\n\t  digest: 'sha256:4fe798298b45cdc8ebfb3....'\n\t}\n  ],\n  sameTags: [\n\t'latest',\n\t'current-bookworm',\n\t'current',\n\t'bookworm',\n\t'21.5.0-bookworm',\n\t'21.5.0',\n\t'21.5-bookworm',\n\t'21.5',\n\t'21-bookworm',\n\t'21'\n  ]\n}\n```\n\n## More examples\n\n\u003e Explore the [examples](https://github.com/BCsabaEngine/docker-hub-tags/tree/master/example) folder for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcsabaengine%2Fdocker-hub-tags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcsabaengine%2Fdocker-hub-tags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcsabaengine%2Fdocker-hub-tags/lists"}